aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-16 17:52:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-16 17:52:15 +0200
commite62aef8ebe4b4b7eb733da6822d7759c0427222b (patch)
tree0a7851a65f622b5f6dae0174d22bdbabb32dfec1 /build
parentad99a55b0bb615f20cec9880aeb96ab0779d56d0 (diff)
Don't fail if we closed our end of pipe early
Diffstat (limited to 'build')
-rw-r--r--build/cxx/compile.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/build/cxx/compile.cxx b/build/cxx/compile.cxx
index 72f8562..2a56fbd 100644
--- a/build/cxx/compile.cxx
+++ b/build/cxx/compile.cxx
@@ -679,7 +679,17 @@ namespace build
// We assume the child process issued some diagnostics.
//
if (!pr.wait ())
- throw failed ();
+ {
+ // In case of a restarts, we closed our end of the pipe early
+ // which might have caused the other end to fail. So far we
+ // experienced this on Fedora 23 with GCC 5.3.1 and there were
+ // no diagnostics issued, just the non-zero exit status. If we
+ // do get diagnostics, then we will have to read and discard the
+ // output until eof.
+ //
+ if (!restart)
+ throw failed ();
+ }
}
catch (const process_error& e)
{