From f2e12f5fb335bb09b2f927ce8ba37403664d04d8 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 2 Jul 2010 04:11:04 +0000 Subject: 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 --- capture_sync.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'capture_sync.c') 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) { -- cgit v1.2.3