Finally document the option to avoid zombie creation
through ignoring SIGCHLD.
This commit is contained in:
parent
0fa2dbcc73
commit
2d289b73e4
@ -32,7 +32,7 @@
|
||||
.\" @(#)signal.3 8.3 (Berkeley) 4/19/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 19, 1994
|
||||
.Dd June 7, 2004
|
||||
.Dt SIGNAL 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -204,6 +204,22 @@ to the
|
||||
function;
|
||||
ignored signals remain ignored.
|
||||
.Pp
|
||||
If a process explicitly specifies
|
||||
.Dv SIG_IGN
|
||||
as the action for the signal
|
||||
.Dv SIGCHLD ,
|
||||
the system will not create zombie processes when children
|
||||
of the calling process exit.
|
||||
As a consequence, the system will discard the exit status
|
||||
from the child processes.
|
||||
If the calling process subsequently issues a call to
|
||||
.Xr wait 2
|
||||
or equivalent, it will block until all of the calling process's
|
||||
children terminate, and then return a value of \-1 with
|
||||
.Va errno
|
||||
set to
|
||||
.Er ECHILD .
|
||||
.Pp
|
||||
See
|
||||
.Xr sigaction 2
|
||||
for a list of functions
|
||||
@ -239,6 +255,7 @@ or
|
||||
.Xr sigaltstack 2 ,
|
||||
.Xr sigprocmask 2 ,
|
||||
.Xr sigsuspend 2 ,
|
||||
.Xr wait 2 ,
|
||||
.Xr fpsetmask 3 ,
|
||||
.Xr setjmp 3 ,
|
||||
.Xr siginterrupt 3 ,
|
||||
@ -248,3 +265,7 @@ This
|
||||
.Fn signal
|
||||
facility appeared in
|
||||
.Bx 4.0 .
|
||||
The option to avoid the creation of child zombies through ignoring
|
||||
.Dv SIGCHLD
|
||||
appeared in
|
||||
.Fx 5.0 .
|
||||
|
@ -32,7 +32,7 @@
|
||||
.\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd April 3, 1994
|
||||
.Dd June 7, 2004
|
||||
.Dt SIGACTION 2
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -201,6 +201,12 @@ a
|
||||
(or equivalent), it blocks until all of the calling process's child
|
||||
processes terminate, and then returns a value of -1 with errno set to
|
||||
.Er ECHILD .
|
||||
The same effect of avoiding zombie creation can also be achieved by setting
|
||||
.Fa sa_handler
|
||||
for
|
||||
.Dv SIGCHLD
|
||||
to
|
||||
.Dv SIG_IGN .
|
||||
.It Dv SA_ONSTACK
|
||||
If this bit is set, the system will deliver the signal to the process
|
||||
on a
|
||||
@ -601,6 +607,10 @@ and
|
||||
.\" and
|
||||
.\" SA_SIGINFO
|
||||
flags are featuring options commonly found in other operating systems.
|
||||
The flags are approved by
|
||||
.St -susv2 ,
|
||||
along with the option to avoid zombie creation by ignoring
|
||||
.Dv SIGCHLD .
|
||||
.Sh SEE ALSO
|
||||
.Xr kill 1 ,
|
||||
.Xr kill 2 ,
|
||||
|
@ -274,6 +274,14 @@ will fail and return immediately if:
|
||||
.It Bq Er ECHILD
|
||||
The calling process has no existing unwaited-for
|
||||
child processes.
|
||||
.It Bq Er ECHILD
|
||||
No status from the terminated child process is available
|
||||
because the calling process has asked the system to discard
|
||||
such status by ignoring the signal
|
||||
.Dv SIGCHLD
|
||||
or setting the flag
|
||||
.Dv SA_NOCLDWAIT
|
||||
for that signal.
|
||||
.It Bq Er EFAULT
|
||||
The
|
||||
.Fa status
|
||||
|
Loading…
Reference in New Issue
Block a user