From 4141d0fe89a45426853aec4569d6e01434f10ddc Mon Sep 17 00:00:00 2001 From: ishmal Date: Fri, 6 Jun 2008 19:21:31 +0000 Subject: [PATCH] finally debugged. read() on a pipe has different results on different boxes. sorry about the many commits --- 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); -- 2.30.2