Code

finally debugged. read() on a pipe has different results on different boxes. sorry...
authorishmal <ishmal@users.sourceforge.net>
Fri, 6 Jun 2008 19:21:31 +0000 (19:21 +0000)
committerishmal <ishmal@users.sourceforge.net>
Fri, 6 Jun 2008 19:21:31 +0000 (19:21 +0000)
buildtool.cpp

index f4e4f8c99dadd8758089d558879cbbe8ce9e7bcb..53f3fc9570a7585ca37eb356ab1d812a0ce396e7 100644 (file)
@@ -4144,16 +4144,14 @@ bool MakeBase::executeCommand(const String &command,
             break;
         if (FD_ISSET(outRead, &fdset))
             {
-            read(outRead, &ch, 1);
-            if (ch <= 0)
+            if (read(outRead, &ch, 1) <= 0 || ch <= 0)
                 outOpen = false;
             else
                 outb.push_back(ch);
             }
         if (FD_ISSET(errRead, &fdset))
             {
-            read(errRead, &ch, 1);
-            if (ch <= 0)
+            if (read(errRead, &ch, 1) <= 0 || ch <= 0)
                 errOpen = false;
             else
                 errb.push_back(ch);