aboutsummaryrefslogtreecommitdiffstats
path: root/capture_sync.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-07-02 04:11:04 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-07-02 04:11:04 +0000
commit874bc8245c1be4ff4fb8d0ec0765c4d29a3bc663 (patch)
tree3ca4df3381aa079a632990cfcf71ba669ed205c6 /capture_sync.c
parent2003da5b769ac5cbb23a302cf7ef0156b6b62835 (diff)
Have sync_pipe_wait_for_child() return the child's exit status on
Windows, just as we do on UN*X. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33410 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_sync.c')
-rw-r--r--capture_sync.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/capture_sync.c b/capture_sync.c
index 585deebd71..b2970c30e4 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -1590,6 +1590,15 @@ sync_pipe_wait_for_child(int fork_child, gchar **msgp)
if (_cwait(&fork_child_status, fork_child, _WAIT_CHILD) == -1) {
*msgp = g_strdup_printf("Error from cwait(): %s", strerror(errno));
ret = -1;
+ } else {
+ /*
+ * The child exited; return its exit status. Do not treat this as
+ * an error.
+ *
+ * XXX - can we distinguish "exited with an exit status XXX" from
+ * "terminated with an uncaught exception YYY"?
+ */
+ ret = fork_child_status;
}
#else
if (waitpid(fork_child, &fork_child_status, 0) != -1) {