If we have pcap_breakloop(), at least on UN*X we can stop the capture
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 21 May 2006 21:32:04 +0000 (21:32 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 21 May 2006 21:32:04 +0000 (21:32 +0000)
commitd311604bc73ef8a43abfaff4d8648c5266f79a33
treec409d2b15ce8779d6b8be480ebe7bf12212f2eab
parent62ff54088b38911f59d79dc952fbd1cd2e555cba
If we have pcap_breakloop(), at least on UN*X we can stop the capture
with a pcap_breakloop() call - we don't need to call select() before
calling pcap_dispatch().

Even if we do need to call select(), we don't need to supply it with a
timeout - it's OK if we block indefinitely, as the signal will interrupt
select().

That also means we can pass -1 as the count to pcap_dispatch(), as
pcap_breakloop() will terminate the loop in pcap_dispatch().

Use sigaction() to catch SIGUSR1, so we can make sure that the signal
handler doesn't get reset when the signal is delivered, and that system
calls don't restart when we return from the signal handler.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18201 f5534014-38df-0310-8fa8-9805f1628bb7
Makefile.nmake
acinclude.m4
capture-wpcap.c
capture_loop.c
capture_loop.h
config.h.win32
config.nmake