_exit(2) and _Exit(2)
Florian Weimer
fweimer@redhat.com
Sat Jun 6 08:50:51 GMT 2026
* Alejandro Colomar:
> 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.
No, the change to exit_group mentioned in the manual page happened in
2002. This commit (from the historic repository) replaced the generic
assembler implementation:
commit f3ecc0add8382dc9294bbbe4f94d7422ebc3ba7e (HEAD)
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 15 02:27:40 2002 +0000
_exit implementation for Linux.
Thanks,
Florian
More information about the Libc-alpha
mailing list