forked from osmocom/wireshark
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>
This commit is contained in:
parent
c84af8d8c6
commit
d62ad9dd47
15
extcap.c
15
extcap.c
|
@ -821,7 +821,6 @@ void extcap_child_watch_cb(GPid pid, gint status _U_, gpointer user_data)
|
||||||
{
|
{
|
||||||
guint i;
|
guint i;
|
||||||
interface_options interface_opts;
|
interface_options interface_opts;
|
||||||
GError * error = 0;
|
|
||||||
extcap_userdata * userdata = NULL;
|
extcap_userdata * userdata = NULL;
|
||||||
capture_options * capture_opts = (capture_options *)(user_data);
|
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;
|
interface_opts.extcap_pid = INVALID_EXTCAP_PID;
|
||||||
userdata->exitcode = 0;
|
userdata->exitcode = 0;
|
||||||
if ( ! g_spawn_check_exit_status(status, &error) )
|
#ifndef _WIN32
|
||||||
userdata->exitcode = error->code;
|
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 )
|
if ( status == 0 && userdata->extcap_stderr != NULL )
|
||||||
userdata->exitcode = 1;
|
userdata->exitcode = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue