Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 2018 15:38:09 +0000
From:      Vitalio D <>
To:        Yuri Pankov <>, Matthias Apitz <>
Cc:        "" <>, "" <>
Subject:   Re: where to find exit(int) function implementation
Message-ID:  <>
In-Reply-To: <>
References:  <> <>, <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Hello, =0A=
Indeed I'm interested in _exit syscall.=0A=
Thanks for response Yuri, but i'm a newbie and don't=0A=
see any PSEUDO marking in unistd.h at least.=0A=
What i see in unisrd.h is =0A=
/* 1003.1-1990 */=0A=
void     _exit(int) __dead2;=0A=
__BEGIN_DECLS being defined in sys/sys/cdefs.h as exten "C" {=0A=
but no PSEUDO. Am i missing something?=0A=
From: Yuri Pankov <>=0A=
Sent: Wednesday, January 10, 2018 14:49=0A=
To: Matthias Apitz; Vitalio D=0A=
Subject: Re: where to find exit(int) function implementation=0A=
On Wed, Jan 10, 2018 at 02:16:16PM +0100, Matthias Apitz:=0A=
> Am 10.01.2018 14:01, schrieb Vitalio D:=0A=
>> Hello,=0A=
>> How and where void _exit(int) is implemented? I've started=0A=
>> with exit(int) defined in exit.c un stdlib, but I've got stuck at=0A=
>> unistd.h where void _exit(int) __dead2;=0A=
>> After that I couldn't find anything by running=0A=
>> find /usr/src -name "*.c" -exec grep " _exit(int" /dev/null {} \;=0A=
> $ find /usr/src -name *.c | grep exit=0A=
> /usr/src/sys/kern/kern_exit.c=0A=
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c=0A=
> /usr/src/lib/libc/arm/aeabi/aeabi_atexit.c=0A=
> /usr/src/lib/libc/stdlib/cxa_thread_atexit.c=0A=
> /usr/src/lib/libc/stdlib/cxa_thread_atexit_impl.c=0A=
> /usr/src/lib/libc/stdlib/exit.c=0A=
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^=0A=
The original question was about _exit(2) syscall, not exit(3).=0A=
WRT the _exit(2), it's marked as "PSEUDO" and relevant PSEUDO macro is=0A=
defined in lib/libc/<arch>/SYS.h (if I'm reading it all correctly).=0A=

Want to link to this message? Use this URL: <>