summaryrefslogtreecommitdiffstats
path: root/buildtool.cpp
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2008-06-06 19:21:31 +0000
committerishmal <ishmal@users.sourceforge.net>2008-06-06 19:21:31 +0000
commita1c56095907908f13200a554c875399e7a7766f1 (patch)
tree15352650acbe35f5d2770bfc685dfd65b4c00742 /buildtool.cpp
parentrewrite pipe reading to avoid deadlock (diff)
downloadinkscape-a1c56095907908f13200a554c875399e7a7766f1.tar.gz
inkscape-a1c56095907908f13200a554c875399e7a7766f1.zip
finally debugged. read() on a pipe has different results on different boxes. sorry about the many commits
(bzr r5832)
Diffstat (limited to 'buildtool.cpp')
-rw-r--r--buildtool.cpp6
1 files 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);