aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-10-19 01:06:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-10-19 01:06:52 +0300
commitff918e63ce478e250721c91eae77ec3477456b84 (patch)
treee5a9b4f6492d55b85ed7858980a5999f9ab54cd3
parent639e679564f8401a6aa5d9233cda0c1618c40fd3 (diff)
Fix msvc-filter to exit with a proper code on VC error
-rw-r--r--msvc-filter.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/msvc-filter.cxx b/msvc-filter.cxx
index 0a06202..2094ab8 100644
--- a/msvc-filter.cxx
+++ b/msvc-filter.cxx
@@ -402,7 +402,12 @@ try
isf.close ();
isp.close ();
- return pr.wait () ? 0 : pr.status;
+ // Passing through the exact child process exit status on failure tends to be
+ // a bit hairy as involves usage of WIFEXITED(), WEXITSTATUS() and handling
+ // the situation when the process is terminated with a signal and so exit
+ // code is unavailable. Lets implement when really required.
+ //
+ return pr.wait () ? 0 : 1;
}
catch (const ios_base::failure&)
{