forked from osmocom/wireshark
extcap: Fix call to child watch
Child watch seems to keep executables in limbo, if extcap_cleanup removed the watch before it could be fired at least once Bug: 12080 Change-Id: I74afafe8545d464ec08b1043a6377a6450e4c772 Reviewed-on: https://code.wireshark.org/review/13900 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
parent
eefcbc0a59
commit
3f43b1df44
8
extcap.c
8
extcap.c
|
@ -658,12 +658,6 @@ void extcap_cleanup(capture_options * capture_opts) {
|
|||
"Extcap [%s] - Closing spawned PID: %d", interface_opts.name,
|
||||
interface_opts.extcap_pid);
|
||||
|
||||
if (interface_opts.extcap_child_watch > 0)
|
||||
{
|
||||
g_source_remove(interface_opts.extcap_child_watch);
|
||||
interface_opts.extcap_child_watch = 0;
|
||||
}
|
||||
|
||||
if (interface_opts.extcap_pid != INVALID_EXTCAP_PID)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
@ -712,7 +706,9 @@ static void extcap_child_watch_cb(GPid pid, gint status _U_, gpointer user_data)
|
|||
if (interface_opts.extcap_pid == pid)
|
||||
{
|
||||
interface_opts.extcap_pid = INVALID_EXTCAP_PID;
|
||||
g_source_remove(interface_opts.extcap_child_watch);
|
||||
interface_opts.extcap_child_watch = 0;
|
||||
|
||||
capture_opts->ifaces = g_array_remove_index(capture_opts->ifaces, i);
|
||||
g_array_insert_val(capture_opts->ifaces, i, interface_opts);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue