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-30 06:11:13 +0000 |
commit | f3a5b33b32cc7343e00b33cf6281b27e47b4896b (patch) | |
tree | 0aff64e87fd33f31ec6f93804b1cfd3a2be70274 /extcap.c | |
parent | 0962de803cf93afeeb1d8c40107668220bf6e318 (diff) | |
download | wireshark-f3a5b33b32cc7343e00b33cf6281b27e47b4896b.tar.gz wireshark-f3a5b33b32cc7343e00b33cf6281b27e47b4896b.tar.bz2 wireshark-f3a5b33b32cc7343e00b33cf6281b27e47b4896b.zip |
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>
(cherry picked from commit d62ad9dd47d368f7545c3cc91f44ecc07476d2e1)
Reviewed-on: https://code.wireshark.org/review/17383
Reviewed-by: Anthony Coddington <anthony.coddington@endace.com>
Diffstat (limited to 'extcap.c')
-rw-r--r-- | extcap.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -838,7 +838,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); @@ -859,8 +858,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; } |