tcpdump mailing list archives

Re: What happened to alarm()?


From: Guy Harris <guy () alum mit edu>
Date: Sat, 29 Nov 2003 18:32:59 -0800

On Sat, Nov 29, 2003 at 06:18:39PM +0100, Gisle Vanem wrote:
Latest tcpdump is rather slow at exiting from a SIGINT now and 
even more so with the new pcap_break_loop().

That might be the case on Windows because SIGINT is delivered in a
separate thread, and doesn't interrupt "PacketReceivePacket()"; on UNIX,
the SIGINT is (in single-threaded programs, which tcpdump is) delivered
in the same thread, and causes a "read()" (or "recvfrom()" or
"getmsg()") to be interrupted, so that it returns -1 and sets "errno" to
EINTR.

The only fix I see would be not to use "pcap_break_loop()" in tcpdump on
Windows, unless there's some way for the thread that receives the
SIGINAT to force "PacketReceivePacket()" to terminate (which might
require WinPcap driver changes) - if there is, "pcap_break_loop()"
should do that.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: