When running
tcpdump-uw with the
-w option, to capture the output in a pcap file, and also using the verbose output (
-v) option, a SIGALRM is explicitly raised every second and that alarm is associated with a signal handler that prints the number of packets captured. This SIGALRM signal interferes with the poll that is monitoring
pcap_read_packet() and this causes the
tcpdump-uw process to exit and stop writing to the pcap file.
Here is an example output:
~ # tcpdump-uw -i vmk0 -v -w /tmp/file.pcaptcpdump-uw: listening on vmk0, link-type EN10MB (Ethernet), capture size 96 bytes
tcpdump-uw: pcap_loop: recvfrom: Interrupted system call
8 packets captured
8 packets received by filter
0 packets dropped by kernel