aboutsummaryrefslogtreecommitdiffstats
path: root/tfshark.c
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2022-08-07 12:31:48 +0200
committerTomasz Moń <desowin@gmail.com>2022-08-10 06:18:15 +0200
commitc1861ad1cc5ea673ee373e0cb69bfcd638ef06a2 (patch)
treeb25877413c4bbe462bd0040c9a2a77060308399c /tfshark.c
parent86c6509cf32ce9350ed20dea4c741052ec65f3dc (diff)
extcap: Close capture session after extcap finishes
Wait up to 30 seconds for extcap process to finish after closing pipes. The wait is achieved in non-blocking fashion, i.e. the UI is completely responsive during the wait. Only actions related to capture process like capture control, file open, save, export are inactive during the wait. On Windows extcap child watch callback gets called immediately as the process is forcefully terminated. Prior to this change the extcap was forcefully terminated on Windows anyway. The wait is possible on UNIX systems if extcap does handle SIGPIPE and SIGTERM signals. The defaults handlers for SIGPIPE and SIGTERM simply terminate the process so for large number of extcaps there is no change. If extcap does not finish within 30 seconds, it is forcefully terminated using SIGKILL signal.
Diffstat (limited to 'tfshark.c')
-rw-r--r--tfshark.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/tfshark.c b/tfshark.c
index 5dd1461e9f..c4630ce456 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -62,7 +62,6 @@
#include <epan/tap.h>
#include <epan/stat_tap_ui.h>
#include <epan/ex-opt.h>
-#include "extcap.h"
#include <wiretap/wtap-int.h>
#include <wiretap/file_wrappers.h>
@@ -966,7 +965,6 @@ clean_exit:
destroy_print_stream(print_stream);
epan_free(cfile.epan);
epan_cleanup();
- extcap_cleanup();
output_fields_free(output_fields);
output_fields = NULL;