_exit(2) and _Exit(2)

Florian Weimer fweimer@redhat.com
Sat Jun 6 10:27:54 GMT 2026


* Alejandro Colomar:

> Hi Florian,
>
> On 2026-06-06T10:50:51+0200, Florian Weimer wrote:
>> * 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.
> [...]
>> 
>> 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.
>
> Ahh, thanks!  Where's the historic repository hosted?

It's here: https://repo.or.cz/glibc/history.git

> Also, did that change affect _Exit() too?  (I assume it did.)

No, this was fixed in a later commit:

commit d2ac5f37690b4e77022f43250b73333e6103c0dd
Author: Roland McGrath <roland@gnu.org>
Date:   Mon Sep 16 04:52:39 2002 +0000

    2002-09-16  Andreas Jaeger  <aj@suse.de>
    
            * sysdeps/unix/sysv/linux/_exit.c: Add libc_hidden_def and weak_alias
            to _Exit.
            * sysdeps/unix/sysv/linux/i386/_exit.S: Likewise.

Thanks,
Florian



More information about the Libc-alpha mailing list