diff options
Diffstat (limited to 'manual/signal.texi')
-rw-r--r-- | manual/signal.texi | 81 |
1 files changed, 71 insertions, 10 deletions
diff --git a/manual/signal.texi b/manual/signal.texi index 5c2ba7d..7e21a93 100644 --- a/manual/signal.texi +++ b/manual/signal.texi @@ -427,9 +427,18 @@ failure to properly emulate them. @deftypevr Macro int SIGSYS @standards{Unix, signal.h} -Bad system call; that is to say, the instruction to trap to the -operating system was executed, but the code number for the system call -to perform was invalid. +System call event. This signal may be generated by a valid system +call which requested an invalid sub-function, and also by the SECCOMP +filter when it filters or traps a system call. + +If the system call itself is invalid or unsupported by the kernel, the +call will not raise this signal, but will return @code{ENOSYS}. +@end deftypevr + +@deftypevr Macro int SIGSTKFLT +Coprocessor stack fault. Obsolete, no longer generated. This signal +may be used by applications in much the way @code{SIGUSR1} and +@code{SIGUSR2} are. @end deftypevr @node Termination Signals @@ -752,12 +761,11 @@ that isn't connected. @xref{Sending Data}. @deftypevr Macro int SIGLOST @standards{GNU, signal.h} @cindex lost resource signal -Resource lost. This signal is generated when you have an advisory lock -on an NFS file, and the NFS server reboots and forgets about your lock. - -On @gnuhurdsystems{}, @code{SIGLOST} is generated when any server program -dies unexpectedly. It is usually fine to ignore the signal; whatever -call was made to the server that died just returns an error. +Resource lost. On @gnuhurdsystems{}, @code{SIGLOST} is generated when +any server program dies unexpectedly. It is usually fine to ignore +the signal; whatever call was made to the server that died just +returns an error. This signal's original purpose of signalling a lost +NFS lock is obsolete. @end deftypevr @deftypevr Macro int SIGXCPU @@ -795,7 +803,7 @@ The default action is to terminate the process. @end deftypevr @deftypevr Macro int SIGWINCH -@standards{BSD, signal.h} +@standards{POSIX.1-2024, signal.h} Window size change. This is generated on some systems (including GNU) when the terminal driver's record of the number of rows and columns on the screen is changed. The default action is to ignore it. @@ -803,6 +811,9 @@ the screen is changed. The default action is to ignore it. If a program does full-screen display, it should handle @code{SIGWINCH}. When the signal arrives, it should fetch the new screen size and reformat its display accordingly. + +This macro was originally a BSD extension, but was added in +POSIX.1-2024. @end deftypevr @deftypevr Macro int SIGINFO @@ -817,6 +828,17 @@ to print some status information about the system and what the process is doing. Otherwise the default is to do nothing. @end deftypevr +@deftypevr Macro int SIGPWR +@cindex power event signal +Power lost or restored. On s390x Linux systems, this signal is +generated when a machine check warning is issued, and is sent to the +process designated to receive ctrl-alt-del notifications. Otherwise, +it is up to userspace applications to generate this signal and manage +notifications as to the type of power event that happened. + +The default action is to terminate the process. +@end deftypevr + @node Signal Messages @subsection Signal Messages @cindex signal messages @@ -1141,6 +1163,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 +1355,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 +1381,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 +1402,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 |