From aa1e053ce638e4f2c91184a43703f4c99998b5bb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 21 May 2006 21:32:04 +0000 Subject: 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. svn path=/trunk/; revision=18201 --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index e831c7372b..df4e712543 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -437,7 +437,7 @@ and did you also install that package?]])) else AC_MSG_RESULT(no) fi - AC_CHECK_FUNCS(pcap_open_dead pcap_freecode) + AC_CHECK_FUNCS(pcap_open_dead pcap_freecode pcap_breakloop) # # Later versions of Mac OS X 10.3[.x] ship a pcap.h that # doesn't define pcap_if_t but ship an 0.8[.x] libpcap, -- cgit v1.2.1