diff options
author | Roland Knall <roland.knall@br-automation.com> | 2016-08-01 16:57:51 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-08-02 11:16:16 +0000 |
commit | d62ad9dd47d368f7545c3cc91f44ecc07476d2e1 (patch) | |
tree | 7bce284685efed5545b7831e6cec38712ffc9205 /extcap.c | |
parent | c84af8d8c694d0104816272a7d30e9ca54fceea6 (diff) | |
download | wireshark-d62ad9dd47d368f7545c3cc91f44ecc07476d2e1.tar.gz |
extcap: Remove g_spawn_check_exit_status
This function is not supported in the min GLIB version, therefore
the code is to be removed
Change-Id: Ie39170bfc0662e5a477cbc45d7eadebcf2c70d4e
Reviewed-on: https://code.wireshark.org/review/16827
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap.c')
-rw-r--r-- | extcap.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -821,7 +821,6 @@ void extcap_child_watch_cb(GPid pid, gint status _U_, gpointer user_data) { guint i; interface_options interface_opts; - GError * error = 0; extcap_userdata * userdata = NULL; capture_options * capture_opts = (capture_options *)(user_data); @@ -842,8 +841,18 @@ void extcap_child_watch_cb(GPid pid, gint status _U_, gpointer user_data) { interface_opts.extcap_pid = INVALID_EXTCAP_PID; userdata->exitcode = 0; - if ( ! g_spawn_check_exit_status(status, &error) ) - userdata->exitcode = error->code; +#ifndef _WIN32 + if ( WIFEXITED(status) ) + { + if ( WEXITSTATUS(status) != 0 ) + userdata->exitcode = WEXITSTATUS(status); + } + else + userdata->exitcode = G_SPAWN_ERROR_FAILED; +#else + if (status != 0) + userdata->exitcode = status; +#endif if ( status == 0 && userdata->extcap_stderr != NULL ) userdata->exitcode = 1; } |