diff options
author | Michael Kerrisk <mtk.manpages@gmail.com> | 2021-08-30 23:36:42 +0200 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2021-08-31 01:21:36 +0200 |
commit | d99b5be0d8e18f175089c54e3ec04b170b4560a7 (patch) | |
tree | 5db7768c7e9b52174ce0ffbcbe587394ff18828e | |
parent | 44803dd03baedd42efdac38d49d1ba90f79c2f5d (diff) |
_exit.2: Clarify the distinction between the raw syscall and the wrapper function
Further clarify the difference between the raw _exit() system call
and the C library wrapper.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r-- | man2/_exit.2 | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/man2/_exit.2 b/man2/_exit.2 index 6d9067eb6..4b3cfd7ac 100644 --- a/man2/_exit.2 +++ b/man2/_exit.2 @@ -112,14 +112,14 @@ canceled upon .BR _exit (), is implementation-dependent. .SS C library/kernel differences -In glibc up to version 2.3, the -.BR _exit () -wrapper function invoked the kernel system call of the same name. -Since glibc 2.3, the wrapper function invokes -.BR exit_group (2), -in order to terminate all of the threads in a process. +The text above in DESCRIPTION describes the traditional effect of +.BR _exit (), +which is to terminate a process, +and these are the semantics specified by POSIIX.1 and implemented +by the C library wrapper function. +On modern systems, this means termination of all threads in the process. .PP -The raw +By contrast with the C library wrapper function, the raw Linux .BR _exit () system call terminates only the calling thread, and actions such as reparenting child processes or sending @@ -127,6 +127,13 @@ reparenting child processes or sending to the parent process are performed only if this is the last thread in the thread group. .\" _exit() is used by pthread_exit() to terminate the calling thread +.PP +In glibc up to version 2.3, the +.BR _exit () +wrapper function invoked the kernel system call of the same name. +Since glibc 2.3, the wrapper function invokes +.BR exit_group (2), +in order to terminate all of the threads in a process. .SH SEE ALSO .BR execve (2), .BR exit_group (2), |