diff options
Diffstat (limited to 'man3/exit.3')
| -rw-r--r-- | man3/exit.3 | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/man3/exit.3 b/man3/exit.3 index 69aa0ef5ae..a3411bd820 100644 --- a/man3/exit.3 +++ b/man3/exit.3 @@ -95,7 +95,11 @@ calls either or .BR longjmp (3). .LP -The use of EXIT_SUCCESS and EXIT_FAILURE is slightly more portable +The use of +.B EXIT_SUCCESS +and +.B EXIT_FAILURE +is slightly more portable (to non-Unix environments) than the use of 0 and some non-zero value like 1 or \-1. In particular, VMS uses a different convention. @@ -109,8 +113,12 @@ the exit status must be transmitted to the parent process. There are three cases. If the parent has set -SA_NOCLDWAIT, or has set the SIGCHLD handler to SIG_IGN, the -status is discarded. +.BR SA_NOCLDWAIT , +or has set the +.B SIGCHLD +handler to +.BR SIG_IGN , +the status is discarded. If the parent was waiting on the child it is notified of the exit status. In both cases the exiting @@ -124,21 +132,32 @@ it later calls one of the .BR wait (2) functions. .LP -If the implementation supports the SIGCHLD signal, this signal +If the implementation supports the +.BR SIGCHLD +signal, this signal is sent to the parent. -If the parent has set SA_NOCLDWAIT, -it is undefined whether a SIGCHLD signal is sent. +If the parent has set +.BR SA_NOCLDWAIT , +it is undefined whether a +.B SIGCHLD +signal is sent. .LP If the process is a session leader and its controlling terminal is the controlling terminal of the session, then each process in the foreground process group of this controlling terminal -is sent a SIGHUP signal, and the terminal is disassociated +is sent a +.B SIGHUP +signal, and the terminal is disassociated from this session, allowing it to be acquired by a new controlling process. .LP If the exit of the process causes a process group to become orphaned, and if any member of the newly orphaned process group is stopped, -then a SIGHUP signal followed by a SIGCONT signal will be +then a +.B SIGHUP +signal followed by a +.B SIGCONT +signal will be sent to each process in this process group. .SH "SEE ALSO" .BR _exit (2), |
