aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/gcc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc/gcc.cxx')
-rw-r--r--libbuild2/cc/gcc.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/libbuild2/cc/gcc.cxx b/libbuild2/cc/gcc.cxx
index 5857709..91a04f6 100644
--- a/libbuild2/cc/gcc.cxx
+++ b/libbuild2/cc/gcc.cxx
@@ -219,11 +219,14 @@ namespace build2
is.close (); // Don't block.
}
- catch (const io_error&)
+ catch (const io_error& e)
{
- pr.wait ();
- fail << "error reading " << x_lang << " compiler -print-search-dirs "
- << "output";
+ if (run_wait (args, pr))
+ fail << "io error reading " << args[0] << " -print-search-dirs "
+ << "output: " << e;
+
+ // If the child process has failed then assume the io error was caused
+ // by that and let run_finish() deal with it.
}
run_finish (args, pr);