diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-07-02 04:11:04 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-07-02 04:11:04 +0000 |
commit | f2e12f5fb335bb09b2f927ce8ba37403664d04d8 (patch) | |
tree | 3ca4df3381aa079a632990cfcf71ba669ed205c6 /capture_sync.c | |
parent | 63a08108741aa3eb91cde3bf2cfffdaab81fe798 (diff) | |
download | wireshark-f2e12f5fb335bb09b2f927ce8ba37403664d04d8.tar.gz wireshark-f2e12f5fb335bb09b2f927ce8ba37403664d04d8.tar.bz2 wireshark-f2e12f5fb335bb09b2f927ce8ba37403664d04d8.zip |
Have sync_pipe_wait_for_child() return the child's exit status on
Windows, just as we do on UN*X.
svn path=/trunk/; revision=33410
Diffstat (limited to 'capture_sync.c')
-rw-r--r-- | capture_sync.c | 9 |
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) { |