Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 2018 15:38:09 +0000
From:      Vitalio D <v.dol_s@hotmail.com>
To:        Yuri Pankov <yuripv@gmx.com>, Matthias Apitz <guru@unixarea.de>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>, "owner-freebsd-questions@freebsd.org" <owner-freebsd-questions@freebsd.org>
Subject:   Re: where to find exit(int) function implementation
Message-ID:  <AM5PR0902MB19235DD34E781169AF9891A0DC110@AM5PR0902MB1923.eurprd09.prod.outlook.com>
In-Reply-To: <8ef73fb7-dc2f-2fcb-f8e6-e7de02a66b64@gmx.com>
References:  <AM5PR0902MB19231F79EA283E2CE7B17310DC110@AM5PR0902MB1923.eurprd09.prod.outlook.com> <59cdf69e792d5c723fa919abac1d67b6@webmail.1blu.de>, <8ef73fb7-dc2f-2fcb-f8e6-e7de02a66b64@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello, =0A=
Indeed I'm interested in _exit syscall.=0A=
=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=
=0A=
...=0A=
__BEGIN_DECLS=0A=
/* 1003.1-1990 */=0A=
void     _exit(int) __dead2;=0A=
...=0A=
=0A=
__BEGIN_DECLS being defined in sys/sys/cdefs.h as exten "C" {=0A=
but no PSEUDO. Am i missing something?=0A=
=0A=
Regards,=0A=
________________________________________=0A=
From: Yuri Pankov <yuripv@gmx.com>=0A=
Sent: Wednesday, January 10, 2018 14:49=0A=
To: Matthias Apitz; Vitalio D=0A=
Cc: freebsd-questions@freebsd.org; owner-freebsd-questions@freebsd.org=0A=
Subject: Re: where to find exit(int) function implementation=0A=
=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=
>>=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=
>=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=
=0A=
The original question was about _exit(2) syscall, not exit(3).=0A=
=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: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AM5PR0902MB19235DD34E781169AF9891A0DC110>