diff options
author | Stephan Kappertz <octopus.sk@googlemail.com> | 2015-11-18 12:13:08 +0100 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-11-18 18:40:40 +0000 |
commit | c3ac3d0217b3f81387cb520c21da27ab46b53041 (patch) | |
tree | f86a66788f8b9ef10fee0bfcb20d67be05476cde | |
parent | aceaaa89b2efa893f9483f4bfecaa14ba97c9e2c (diff) | |
download | wireshark-c3ac3d0217b3f81387cb520c21da27ab46b53041.tar.gz |
Error from waitpid(): Fix Code is unreachable
Change-Id: Ib93bd7d62eb16177cfdcb82148c97a64f6e497b4
Reviewed-on: https://code.wireshark.org/review/11939
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit 5c49facc4f2a9a054258c5921bc68293d6eab3e4)
Reviewed-on: https://code.wireshark.org/review/11948
-rw-r--r-- | capchild/capture_sync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c index be32aba869..417d5c4807 100644 --- a/capchild/capture_sync.c +++ b/capchild/capture_sync.c @@ -2020,12 +2020,12 @@ sync_pipe_wait_for_child(ws_process_id fork_child, gchar **msgp) fork_child_status); ret = -1; } - } else if (errno != ECHILD) { - *msgp = g_strdup_printf("Error from waitpid(): %s", g_strerror(errno)); - ret = -1; } else if (errno == EINTR) { g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_WARNING, "sync_pipe_wait_for_child: waitpid returned EINTR. retrying."); continue; + } else if (errno != ECHILD) { + *msgp = g_strdup_printf("Error from waitpid(): %s", g_strerror(errno)); + ret = -1; } else { /* errno == ECHILD ; echld might have already reaped the child */ ret = fetch_dumpcap_pid ? 0 : -1; |