diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2008-06-06 21:11:07 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2008-06-06 21:11:07 +0000 |
| commit | 56a987eb8485be1c6ae26a419a905972eaef9e11 (patch) | |
| tree | 26fabf672485861b78b31d69ba9d641f87a631e8 /buildtool.cpp | |
| parent | finally debugged. read() on a pipe has different results on different boxes.... (diff) | |
| download | inkscape-56a987eb8485be1c6ae26a419a905972eaef9e11.tar.gz inkscape-56a987eb8485be1c6ae26a419a905972eaef9e11.zip | |
rollup of buildtool/unix work. compiles and links inkscape
(bzr r5833)
Diffstat (limited to 'buildtool.cpp')
| -rw-r--r-- | buildtool.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/buildtool.cpp b/buildtool.cpp index 53f3fc957..bc6da92d3 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -4130,7 +4130,7 @@ bool MakeBase::executeCommand(const String &command, bool outOpen = true; bool errOpen = true; - while (outOpen && errOpen) + while (outOpen || errOpen) { char ch; fd_set fdset; @@ -4144,14 +4144,18 @@ bool MakeBase::executeCommand(const String &command, break; if (FD_ISSET(outRead, &fdset)) { - if (read(outRead, &ch, 1) <= 0 || ch <= 0) + if (read(outRead, &ch, 1) <= 0) + outOpen = false; + else if (ch <= 0) outOpen = false; else outb.push_back(ch); } if (FD_ISSET(errRead, &fdset)) { - if (read(errRead, &ch, 1) <= 0 || ch <= 0) + if (read(errRead, &ch, 1) <= 0) + errOpen = false; + else if (ch <= 0) errOpen = false; else errb.push_back(ch); |
