Hash :
a3f953e8
Author :
Date :
2008-08-16T13:47:58
c-stack: fix regression on Irix 5.3 from 2008-06-21 * m4/c-stack.m4 (gl_PREREQ_C_STACK): Move check for sa_sigaction... * m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): ...here. (gl_PREREQ_SIGACTION): Depend on sig-handler.h prereq's. * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Set the default. * modules/signal (Makefile.am): Use the value. * lib/signal.in.h (sa_sigaction) [HAVE_SIGACTION && !HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define. * doc/posix-headers/signal.texi (signal.h): Document this portability issue. * doc/posix-functions/sigaction.texi (sigaction): Likewise. Reported by Tom G. Christensen. Signed-off-by: Eric Blake <ebb9@byu.net>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
@node sigaction
@section @code{sigaction}
@findex sigaction
POSIX specification: @url{http://www.opengroup.org/susv3xsh/sigaction.html}
Gnulib module: sigaction
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
mingw.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
POSIX recommends that when specifying SA_RESETHAND, SA_NODEFER must
also be specified.
@item
Support for SA_ONSTACK is missing on some platforms:
mingw, cygwin.
@item
Support for SA_SIGINFO is missing on some platforms:
mingw, Interix 3.5.
@item
Support for SIGCHLD, and thus for SA_NOCLDSTOP and SA_NOCLDWAIT, is
missing on some platforms:
mingw.
@item
Support for SA_RESTART is missing on some platforms:
mingw.
@item
In spite of having SA_SIGACTION, struct sigaction lacks the
sa_sigaction member on some platforms:
Irix 5.3.
@item
The symbolic value @code{SIG_IGN} for the @code{SIGCHLD} signal is equivalent
to a signal handler
@smallexample
void handle_child (int sigchld)
@{
while (waitpid (-1, NULL, WNOHANG) > 0)
;
@}
@end smallexample
except that @code{SIG_IGN} for @code{SIGCHLD} has the effect that the children
execution times are not accounted in the @code{times} function.
On some platforms (BSD? SystemV? Linux?), you need to use the @code{sigaction}
flag @code{SA_NOCLDWAIT} in order to obtain this behavior.
@end itemize