From 737a840daa49f0311546534fc6dc9bf4953173b9 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 25 Mar 2021 09:32:30 +0100 Subject: [PATCH] _exit.2: Add a little more detail on the raw _exit() system cal Signed-off-by: Michael Kerrisk --- man2/_exit.2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/man2/_exit.2 b/man2/_exit.2 index 8805fbad2..6d9067eb6 100644 --- a/man2/_exit.2 +++ b/man2/_exit.2 @@ -118,9 +118,15 @@ 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 raw +.PP +The raw .BR _exit () -system call terminates only the calling thread.) +system call terminates only the calling thread, and actions such as +reparenting child processes or sending +.B SIGCHLD +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 .SH SEE ALSO .BR execve (2), .BR exit_group (2),