aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2024-12-10 17:07:21 -0500
committerDJ Delorie <dj@redhat.com>2024-12-16 18:23:43 -0500
commit87cd94bba4091d22e24116298ade33b712ada235 (patch)
tree04640c5d03027f5de9ce1e7810e8759021ce63fb
parent50c35842df9bfb370a36ef2360463c69f04faa9a (diff)
downloadglibc-87cd94bba4091d22e24116298ade33b712ada235.zip
glibc-87cd94bba4091d22e24116298ade33b712ada235.tar.gz
glibc-87cd94bba4091d22e24116298ade33b712ada235.tar.bz2
manual: Document more sigaction flagsHEADmaster
Adds documentation for three-argument handler Adds remainder of the SA_* flags Reviewed-by: Florian Weimer <fweimer@redhat.com>
-rw-r--r--manual/signal.texi39
1 files changed, 39 insertions, 0 deletions
diff --git a/manual/signal.texi b/manual/signal.texi
index 5c2ba7d..2012980 100644
--- a/manual/signal.texi
+++ b/manual/signal.texi
@@ -1141,6 +1141,15 @@ This is used in the same way as the @var{action} argument to the
@code{signal} function. The value can be @code{SIG_DFL},
@code{SIG_IGN}, or a function pointer. @xref{Basic Signal Handling}.
+@item void (*sa_sigaction) (int @var{signum}, siginfo_t *@var{info}, void *@var{ucontext})
+This is an alternate to @code{sa_handler} that is used when the
+@code{sa_flags} includes the @code{flag SA_SIGINFO}. Note that this
+and @code{sa_handler} overlap; only ever set one at a time.
+
+The contents of the @var{info} and @var{ucontext} structures are
+kernel and architecture dependent. Please see
+@manpageurl{sigaction,2} for details.
+
@item sigset_t sa_mask
This specifies a set of signals to be blocked while the handler runs.
Blocking is explained in @ref{Blocking for Handler}. Note that the
@@ -1324,6 +1333,24 @@ delivered for both terminated children and stopped children.
Setting this flag for a signal other than @code{SIGCHLD} has no effect.
@end deftypevr
+@deftypevr Macro int SA_NOCLDWAIT
+This flag is meaningful only for the @code{SIGCHLD} signal. When the
+flag is set, the terminated child will not wait for the parent to reap
+it, or become a zombie if not reaped. The child will instead be
+reaped by the kernel immediately on termination, similar to setting
+SIGCHLD to SIG_IGN.
+
+Setting this flag for a signal other than @code{SIGCHLD} has no effect.
+@end deftypevr
+
+@deftypevr Macro int SA_NODEFER
+Normally a signal is added to the signal mask while running its own
+handler; this negates that, so that the same signal can be received
+while it's handler is running. Note that if the signal is included in
+@code{sa_mask}, it is masked regardless of this flag. Only useful when
+assigning a function as a signal handler.
+@end deftypevr
+
@deftypevr Macro int SA_ONSTACK
@standards{BSD, signal.h}
If this flag is set for a particular signal number, the system uses the
@@ -1332,6 +1359,12 @@ If a signal with this flag arrives and you have not set a signal stack,
the normal user stack is used instead, as if the flag had not been set.
@end deftypevr
+@deftypevr Macro int SA_RESETHAND
+Resets the handler for a signal to SIG_DFL, at the moment specified
+handler function begins. I.e. the handler is called once, then the
+action resets.
+@end deftypevr
+
@deftypevr Macro int SA_RESTART
@standards{BSD, signal.h}
This flag controls what happens when a signal is delivered during
@@ -1347,6 +1380,12 @@ clear, returning from a handler makes the function fail.
@xref{Interrupted Primitives}.
@end deftypevr
+@deftypevr Macro int SA_SIGINFO
+Indicates that the @code{sa_sigaction} three-argument form of the
+handler should be used in setting up a handler instead of the
+one-argument @code{sa_handler} form.
+@end deftypevr
+
@node Initial Signal Actions
@subsection Initial Signal Actions
@cindex initial signal actions