Whamcloud - gitweb
b=22168 Ignore EINTR returned from write
authorRobert Read <robert.read@oracle.com>
Thu, 17 Jun 2010 22:34:47 +0000 (15:34 -0700)
committerRobert Read <robert.read@oracle.com>
Fri, 18 Jun 2010 19:26:31 +0000 (12:26 -0700)
lustre/tests/mpi/write_disjoint.c

index f26853b..67c67d0 100644 (file)
@@ -149,10 +149,11 @@ int main (int argc, char *argv[]) {
                 do {
                         ret = write(fd, chunk_buf[rank] + done,
                                     CHUNK_SIZE(n) - done);
-                        if (ret < 0)
+                        if (ret < 0 && errno != EINTR)
                                 rprintf(rank, n, "write() returned %s\n",
                                         strerror(errno));
-                        done += ret;
+                        if (ret > 0)
+                                done += ret;
                 } while (done != CHUNK_SIZE(n));
 
                 MPI_Barrier(MPI_COMM_WORLD);