Neither dumpcap nor Wireshark delete the temporary capture file when terminated.
Summary
Neither dumpcap
nor Wireshark delete the temporary capture file when terminated.
Steps to reproduce
-
Run
dumpcap
without specifying a file to write packets to so that a temporary file is created instead. For example:dumpcap.exe -i 10
-
Terminate
dumpcap
using<CTRL-C>
. -
Observe that the temporary file created by
dumpcap
is still present in the temporary folder.
Repeat for Wireshark by running it on the command-line as Wireshark.exe -i 10 -k
and then killing it via <CTRL-C>
and observe that the temporary capture file isn't deleted.
What is the current bug behavior?
Temporary capture files created by dumpcap
or by Wireshark (when run from the command-line using -k) are not removed when the capture tool is terminated via <CTRL-C>
.
What is the expected correct behavior?
The temporary capture file created by dumpcap
or Wireshark should be removed when the tool is terminated.
Build information
Dumpcap (Wireshark) 4.1.0 (v4.1.0rc0-451-ga19834b98cda).
Copyright 1998-2022 Gerald Combs <gerald@wireshark.org> and contributors.
Licensed under the terms of the GNU General Public License (version 2 or later).
This is free software; see the file named COPYING in the distribution. There is
NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) using Microsoft Visual Studio 2022 (VC++ 14.33, build 31630),
with GLib 2.72.3, with PCRE2, with zlib 1.2.12, with libpcap, with binary
plugins, with UTF-8 validation.
Running on 64-bit Windows 10 (21H2), build 19044, with Intel(R) Xeon(R) CPU
E3-1505M v5 @ 2.80GHz (with SSE4.2), with 16231 MB of physical memory, with GLib
2.72.3, with PCRE2 10.40 2022-04-14, with Npcap version 1.71, based on libpcap
version 1.10.2-PRE-GIT, with LC_TYPE=C, binary plugins supported.```