mirror of https://github.com/mkerrisk/man-pages
Note that SA_NOCLDSTOP is only meaningful if establishing a
handler for SIGCHLD. Describe POSIX specification, and Linux semantics for SA_NOCLDWAIT when establishing a handler for SIGCHLD. Add pointer under SA_RESTART to new text in signal(7) describing system call restarting. Other minor edits.
This commit is contained in:
parent
8404ecb514
commit
bbd7e60a1b
|
@ -40,7 +40,7 @@
|
||||||
.\" 2005-09-15, mtk, split sigpending(), sigprocmask(), sigsuspend()
|
.\" 2005-09-15, mtk, split sigpending(), sigprocmask(), sigsuspend()
|
||||||
.\" out of this page into separate pages.
|
.\" out of this page into separate pages.
|
||||||
.\"
|
.\"
|
||||||
.TH SIGACTION 2 2007-07-08 "Linux" "Linux Programmer's Manual"
|
.TH SIGACTION 2 2008-07-04 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sigaction \- examine and change a signal action
|
sigaction \- examine and change a signal action
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -137,8 +137,7 @@ will be blocked, unless the
|
||||||
flag is used.
|
flag is used.
|
||||||
.PP
|
.PP
|
||||||
.I sa_flags
|
.I sa_flags
|
||||||
specifies a set of flags which modify the behavior of the signal handling
|
specifies a set of flags which modify the behavior of the signal.
|
||||||
process.
|
|
||||||
It is formed by the bitwise OR of zero or more of the following:
|
It is formed by the bitwise OR of zero or more of the following:
|
||||||
.RS 4
|
.RS 4
|
||||||
.TP
|
.TP
|
||||||
|
@ -156,9 +155,10 @@ or resume (i.e., they receive
|
||||||
.BR SIGCONT )
|
.BR SIGCONT )
|
||||||
(see
|
(see
|
||||||
.BR wait (2)).
|
.BR wait (2)).
|
||||||
|
This flag is only meaningful when establishing a handler for
|
||||||
|
.BR SIGCHLD .
|
||||||
.TP
|
.TP
|
||||||
.B SA_NOCLDWAIT
|
.BR SA_NOCLDWAIT " (Since Linux 2.6)"
|
||||||
(Linux 2.6 and later)
|
|
||||||
.\" To be precise: Linux 2.5.60 -- MTK
|
.\" To be precise: Linux 2.5.60 -- MTK
|
||||||
If
|
If
|
||||||
.I signum
|
.I signum
|
||||||
|
@ -167,10 +167,27 @@ is
|
||||||
do not transform children into zombies when they terminate.
|
do not transform children into zombies when they terminate.
|
||||||
See also
|
See also
|
||||||
.BR waitpid (2).
|
.BR waitpid (2).
|
||||||
|
This flag is only meaningful when establishing a handler for
|
||||||
|
.BR SIGCHLD ,
|
||||||
|
or when setting that signal's disposition to
|
||||||
|
.BR SIG_DFL .
|
||||||
|
|
||||||
|
If the
|
||||||
|
.B SA_NOCLDWAIT
|
||||||
|
flag is set when establishing a handler for
|
||||||
|
.BR SIGCHLD ,
|
||||||
|
POSIX.1 leaves it unspecified whether a
|
||||||
|
.B SIGCHLD
|
||||||
|
signal is generated when a child process terminates.
|
||||||
|
On Linux, a
|
||||||
|
.B SIGCHLD
|
||||||
|
signal is generated in this case;
|
||||||
|
on some other implementations, it is not.
|
||||||
.TP
|
.TP
|
||||||
.B SA_RESETHAND
|
.BR SA_RESETHAND
|
||||||
Restore the signal action to the default state once the signal handler
|
Restore the signal action to the default state once the signal handler
|
||||||
has been called.
|
has been called.
|
||||||
|
This flag is only meaningful when establishing a signal handler.
|
||||||
.B SA_ONESHOT
|
.B SA_ONESHOT
|
||||||
is an obsolete, non-standard synonym for this flag.
|
is an obsolete, non-standard synonym for this flag.
|
||||||
.TP
|
.TP
|
||||||
|
@ -178,26 +195,33 @@ is an obsolete, non-standard synonym for this flag.
|
||||||
Call the signal handler on an alternate signal stack provided by
|
Call the signal handler on an alternate signal stack provided by
|
||||||
.BR sigaltstack (2).
|
.BR sigaltstack (2).
|
||||||
If an alternate stack is not available, the default stack will be used.
|
If an alternate stack is not available, the default stack will be used.
|
||||||
|
This flag is only meaningful when establishing a signal handler.
|
||||||
.TP
|
.TP
|
||||||
.B SA_RESTART
|
.B SA_RESTART
|
||||||
Provide behavior compatible with BSD signal semantics by making certain
|
Provide behavior compatible with BSD signal semantics by making certain
|
||||||
system calls restartable across signals.
|
system calls restartable across signals.
|
||||||
|
This flag is only meaningful when establishing a signal handler.
|
||||||
|
See
|
||||||
|
.BR signal (7)
|
||||||
|
for a discussion of system call restarting.
|
||||||
.TP
|
.TP
|
||||||
.B SA_NODEFER
|
.B SA_NODEFER
|
||||||
Do not prevent the signal from being received from within its own signal
|
Do not prevent the signal from being received from within its own signal
|
||||||
handler.
|
handler.
|
||||||
|
This flag is only meaningful when establishing a signal handler.
|
||||||
.B SA_NOMASK
|
.B SA_NOMASK
|
||||||
is an obsolete, non-standard synonym for this flag.
|
is an obsolete, non-standard synonym for this flag.
|
||||||
.TP
|
.TP
|
||||||
.B SA_SIGINFO
|
.BR SA_SIGINFO " (since Linux 2.2)"
|
||||||
The signal handler takes 3 arguments, not one.
|
The signal handler takes 3 arguments, not one.
|
||||||
In this case,
|
In this case,
|
||||||
.I sa_sigaction
|
.I sa_sigaction
|
||||||
should be set instead of
|
should be set instead of
|
||||||
.IR sa_handler .
|
.IR sa_handler .
|
||||||
(The
|
This flag is only meaningful when establishing a signal handler.
|
||||||
.I sa_sigaction
|
.\" (The
|
||||||
field was added in Linux 2.1.86.)
|
.\" .I sa_sigaction
|
||||||
|
.\" field was added in Linux 2.1.86.)
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
@ -547,10 +571,6 @@ Use of these latter values in
|
||||||
may be less portable in applications intended for older
|
may be less portable in applications intended for older
|
||||||
Unix implementations.
|
Unix implementations.
|
||||||
.PP
|
.PP
|
||||||
Support for
|
|
||||||
.B SA_SIGINFO
|
|
||||||
was added in Linux 2.2.
|
|
||||||
.PP
|
|
||||||
The
|
The
|
||||||
.B SA_RESETHAND
|
.B SA_RESETHAND
|
||||||
flag is compatible with the SVr4 flag of the same name.
|
flag is compatible with the SVr4 flag of the same name.
|
||||||
|
@ -564,11 +584,6 @@ allowed the receipt of any signal, not just the one we are installing
|
||||||
(effectively overriding any
|
(effectively overriding any
|
||||||
.I sa_mask
|
.I sa_mask
|
||||||
settings).
|
settings).
|
||||||
.\".PP
|
|
||||||
.\"The
|
|
||||||
.\".BR SA_RESETHAND " and " SA_NODEFER
|
|
||||||
.\"names for SVr4 compatibility are present only in library versions 3.0.9
|
|
||||||
.\"and greater.
|
|
||||||
.PP
|
.PP
|
||||||
.BR sigaction ()
|
.BR sigaction ()
|
||||||
can be called with a null second argument to query the current signal
|
can be called with a null second argument to query the current signal
|
||||||
|
|
Loading…
Reference in New Issue