tcpdump mailing list archives
Re: What happened to alarm()?
From: Guy Harris <guy () alum mit edu>
Date: Sat, 29 Nov 2003 12:42:56 -0800
On Sat, Nov 29, 2003 at 06:18:39PM +0100, Gisle Vanem wrote:
Why has the use of alarm() been removed from the 3.8 version of getname()? Non-portable issue?
I *think* it was picked up from OpenBSD, where I *suspect* it was done because it's unsafe to do very much in a signal handler and the concern was that longjmping out of a signal handler could leave some part of the application or libraries in an inconsistent state. (This is *definitely* a problem on Mac OS X, for example, where Ethereal, which still does the alarm()/longjmp stuff, can sometimes *crash* if you longjmp out of a host name lookup.)
Latest tcpdump is rather slow at exiting from a SIGINT now and even more so with the new pcap_break_loop().
"pcap_break_loop()" shouldn't make things worse; I'll look at 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:
- What happened to alarm()? Gisle Vanem (Nov 29)
- Re: What happened to alarm()? Guy Harris (Nov 29)
- Re: What happened to alarm()? Gisle Vanem (Nov 29)
- Re: What happened to alarm()? Guy Harris (Nov 29)
- Message not available
- Re: What happened to alarm()? Guy Harris (Nov 29)
- Re: What happened to alarm()? Gisle Vanem (Nov 29)
- Re: What happened to alarm()? Guy Harris (Nov 29)