Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] pread_whole must restart in cas of EINTR, not EAGAIN
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 19 Jun 2014 12:47:41 +0000 (14:47 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 19 Jun 2014 12:47:41 +0000 (14:47 +0200)
This probably won't happen with this file anyway.

src/mc/mc_page_snapshot.cpp

index f2e227a..833d70c 100644 (file)
@@ -67,9 +67,9 @@ static size_t pread_whole(int fd, void* buf, size_t count, off_t offset) {
     if (n==0)
       return res;
 
     if (n==0)
       return res;
 
-    // Error (or EAGAIN):
+    // Error (or EINTR):
     if (n==-1) {
     if (n==-1) {
-      if (errno == EAGAIN)
+      if (errno == EINTR)
         continue;
       else
         return -1;
         continue;
       else
         return -1;