_exit(2) and _Exit(2)
Alejandro Colomar
alx@kernel.org
Fri Jun 5 21:14:53 GMT 2026
Hi Florian!
I'm revising the _exit(2) manual page (soon to be moved to _exit(3)).
While there, I noticed something a bit ambiguous/unclear.
_Exit() is specified as equivalent to _exit().
Then, in NOTES we have text saying that the behavior of _exit() changed
from calling SYS_exit to calling exit_group(2). That text explicitly
talks about _exit(), and not generically about both functions; I suspect
that's just a wording mistake, and not an intentional one.
The commit that changed glibc seems to be
commit 8fabe0e632bd441c760f878d1022c378f04f8497
Author: Florian Weimer <fweimer@redhat.com>
Date: 2022-08-04 06:17:50 +0200
Linux: Remove exit system call from _exit
exit only terminates the current thread, not the whole process, so it
is the wrong fallback system call in this context. All supported
Linux versions implement the exit_group system call anyway.
It is unclear to me (both from the text of the manual page and also from
the glibc change) whether that change also affected _Exit() or if that
had always used exit_group(2). I presume it has always been an alias
for _exit(2) and thus it was also affected by that patch.
Could you please confirm?
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260605/2101d27c/attachment.sig>
More information about the Libc-alpha
mailing list