chiark / gitweb /
Make run_directory.c stat the place it is going to try to run.
[elogind.git] / klibc / klibc / fwrite.c
index 0a73188c67847a50e70fec7e8f4acce9b8050664..ad61c86b886d3cf86fd49549244d07af0c947d8b 100644 (file)
@@ -15,9 +15,10 @@ size_t _fwrite(const void *buf, size_t count, FILE *f)
   while ( count ) {
     rv = write(fileno(f), p, count);
     if ( rv == -1 ) {
-      if ( errno == EINTR )
-       continue;
-      else
+      if ( errno == EINTR ) {
+       errno = 0;
+       continue; 
+      } else
        break;
     } else if ( rv == 0 ) {
       break;