diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-03-02 09:11:31 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-03-02 18:07:58 +0000 |
commit | 80d652f06e205be070ba151158042c12adbb2d7e (patch) | |
tree | 937a17493e2c326a0716324d0770242d56dce4b0 /capture_opts.c | |
parent | 184ef021110d52d123104c77863df92f7ecc5f6e (diff) | |
download | wireshark-80d652f06e205be070ba151158042c12adbb2d7e.tar.gz wireshark-80d652f06e205be070ba151158042c12adbb2d7e.tar.bz2 wireshark-80d652f06e205be070ba151158042c12adbb2d7e.zip |
More spawned process handling updates.
Document ws_pipe.h. Define invalid PIDs in one place.
Extcap didn't use stdin before 1a0987904f. Make sure we close it.
Change-Id: I7a69cd9b5137ae82435e64628a22e4d812d58f89
Reviewed-on: https://code.wireshark.org/review/26226
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/capture_opts.c b/capture_opts.c index a8bddee36f..7cc0c5d43e 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -55,7 +55,7 @@ capture_opts_init(capture_options *capture_opts) capture_opts->default_options.extcap_fifo = NULL; capture_opts->default_options.extcap_args = NULL; capture_opts->default_options.extcap_pipedata = NULL; - capture_opts->default_options.extcap_pid = INVALID_EXTCAP_PID; + capture_opts->default_options.extcap_pid = WS_INVALID_PID; #ifdef _WIN32 capture_opts->default_options.extcap_pipe_h = INVALID_HANDLE_VALUE; capture_opts->default_options.extcap_control_in_h = INVALID_HANDLE_VALUE; @@ -684,7 +684,7 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str interface_opts.promisc_mode = capture_opts->default_options.promisc_mode; interface_opts.extcap_fifo = g_strdup(capture_opts->default_options.extcap_fifo); interface_opts.extcap_args = NULL; - interface_opts.extcap_pid = INVALID_EXTCAP_PID; + interface_opts.extcap_pid = WS_INVALID_PID; interface_opts.extcap_pipedata = NULL; #ifdef _WIN32 interface_opts.extcap_pipe_h = INVALID_HANDLE_VALUE; @@ -1126,7 +1126,7 @@ capture_opts_del_iface(capture_options *capture_opts, guint if_index) g_free(interface_opts->extcap_fifo); if (interface_opts->extcap_args) g_hash_table_unref(interface_opts->extcap_args); - if (interface_opts->extcap_pid != INVALID_EXTCAP_PID) + if (interface_opts->extcap_pid != WS_INVALID_PID) g_spawn_close_pid(interface_opts->extcap_pid); g_free(interface_opts->extcap_pipedata); g_free(interface_opts->extcap_control_in); @@ -1177,7 +1177,7 @@ collect_ifaces(capture_options *capture_opts) interface_opts.extcap_fifo = NULL; interface_opts.extcap_pipedata = NULL; interface_opts.extcap_args = device->external_cap_args_settings; - interface_opts.extcap_pid = INVALID_EXTCAP_PID; + interface_opts.extcap_pid = WS_INVALID_PID; if (interface_opts.extcap_args) g_hash_table_ref(interface_opts.extcap_args); interface_opts.extcap_pipedata = NULL; |