From 7b57506d6de12ea2ad5c0e7f4ce4e437e970a0cc Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 14 Jun 2005 11:20:57 +0000 Subject: [PATCH] Various minor changes --- man2/_exit.2 | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/man2/_exit.2 b/man2/_exit.2 index c7a12b143..14b097cba 100644 --- a/man2/_exit.2 +++ b/man2/_exit.2 @@ -39,10 +39,12 @@ _exit, _Exit \- terminate the current process .BI "void _Exit(int " status ); .SH DESCRIPTION The function -.B _exit +.BR _exit() terminates the calling process "immediately". Any open file descriptors belonging to the process are closed; any children of the process are -inherited by process 1, init, and the process's parent is sent a +inherited by process 1, +.IR init , +and the process's parent is sent a .B SIGCHLD signal. .LP @@ -54,30 +56,32 @@ can be collected using one of the family of calls. .LP The function -.B _Exit +.B _Exit() is equivalent to -.BR _exit . +.BR _exit() . .SH "RETURN VALUE" These functions do not return. .SH "CONFORMING TO" SVr4, SVID, POSIX, X/OPEN, BSD 4.3. -The function \fI_Exit()\fP was introduced by C99. +The function \fB_Exit()\fP was introduced by C99. .SH NOTES For a discussion on the effects of an exit, the transmission of exit status, zombie processes, signals sent, etc., see .BR exit (3). .LP The function -.B _exit -is like \fBexit()\fP, but does not call any functions registered -with the ANSI C -.B atexit -function, nor any registered signal handlers. Whether it flushes +.B _exit() +is like \fBexit()\fP, but does not call any process termination +functions registered with +.BR atexit() +or +.BR on_exit() . +Whether it flushes standard I/O buffers and removes temporary files created with .BR tmpfile (3) -is implementation-dependent. +is implementation dependent. On the other hand, -.B _exit +.B _exit() does close open file descriptors, and this may cause an unknown delay, waiting for pending output to finish. If the delay is undesired, it may be useful to call functions like \fItcflush()\fP before @@ -91,5 +95,7 @@ cancelled upon \fB_exit()\fP, is implementation-dependent. .BR wait (2), .BR wait4 (2), .BR waitpid (2), +.BR atexit (3), .BR exit (3), +.BR on_exit (3), .BR termios (3)