aboutsummaryrefslogtreecommitdiffstats
path: root/extcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'extcap.c')
-rw-r--r--extcap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/extcap.c b/extcap.c
index b553127c58..ee7e469f45 100644
--- a/extcap.c
+++ b/extcap.c
@@ -1343,6 +1343,15 @@ gboolean extcap_session_stop(capture_session *cap_session)
#else
if (interface_opts->extcap_fifo != NULL && file_exists(interface_opts->extcap_fifo))
{
+ /* If extcap didn't open the fifo, dumpcap would be waiting on it
+ * until user manually stops capture. Simply open and close fifo
+ * here to let dumpcap return from the select() call. This has no
+ * effect if dumpcap is not waiting.
+ */
+ int fd = ws_open(interface_opts->extcap_fifo, O_WRONLY, 0000);
+ if (fd != -1) {
+ close(fd);
+ }
/* the fifo will not be freed here, but with the other capture_opts in capture_sync */
ws_unlink(interface_opts->extcap_fifo);
interface_opts->extcap_fifo = NULL;