From a1c56095907908f13200a554c875399e7a7766f1 Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Fri, 6 Jun 2008 19:21:31 +0000 Subject: finally debugged. read() on a pipe has different results on different boxes. sorry about the many commits (bzr r5832) --- buildtool.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/buildtool.cpp b/buildtool.cpp index f4e4f8c99..53f3fc957 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -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); -- cgit v1.2.3