On Wed, Jan 24, 2001 at 12:59:50PM +0100, Matthias Andree wrote:
> > However, where is "signal()" declared in Linux header files? The glibc
> > 2.1.2 "signal.h" header appears to define "sigset()" as returning a
> > "__sighandler_t", which is a function pointer, and "setsignal.c"
> > includes <signal.h>, so it sounds as if it *should* think "sigset()"
> > returns a pointer.
>
> Running cscope against the tcpdump 3.6.1 sources, I figure it's this (glibc
> 2.1.3, if that matters) in /usr/include/signal.h:
I meant to say "where is 'sigset()' declared", and the answer is "in
<signal.h>, but only if you define the right #define to include the
Unix98 stuff".
Can anybody think of a good reason why we should, as the comment in
"aclocal.m4" for tcpdump says, "prefer sigset() to sigaction()", given
that "sigaction()" is in POSIX and "sigset()" is an old 4.1BSDism that
AT&T eventually picked up in System V (rather than picking up the 4.2BSD
signal mechanism) but Berkeley dropped as of 4.2BSD, and that got into
the SVID and eventually into the X/Open specs.
I.e., you get "sigaction()" if you're POSIX-compliant, but you don't
necessarily get "sigset()" merely because you're POSIX-compliant.
Changing "AC_LBL_TYPE_SIGNAL" to prefer "sigaction()" made tcpdump
compile without the complaint about "sigset()", and it seemed to handle
^C during a capture OK.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe