Date: Wed, 10 Jan 2018 16:49:33 +0300 From: Yuri Pankov <yuripv@gmx.com> To: Matthias Apitz <guru@unixarea.de>, Vitalio D <v.dol_s@hotmail.com> Cc: freebsd-questions@freebsd.org, owner-freebsd-questions@freebsd.org Subject: Re: where to find exit(int) function implementation Message-ID: <8ef73fb7-dc2f-2fcb-f8e6-e7de02a66b64@gmx.com> In-Reply-To: <59cdf69e792d5c723fa919abac1d67b6@webmail.1blu.de> References: <AM5PR0902MB19231F79EA283E2CE7B17310DC110@AM5PR0902MB1923.eurprd09.prod.outlook.com> <59cdf69e792d5c723fa919abac1d67b6@webmail.1blu.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 10, 2018 at 02:16:16PM +0100, Matthias Apitz: > Am 10.01.2018 14:01, schrieb Vitalio D: >> Hello, >> >> How and where void _exit(int) is implemented? I've started >> with exit(int) defined in exit.c un stdlib, but I've got stuck at >> unistd.h where void _exit(int) __dead2; >> After that I couldn't find anything by running >> find /usr/src -name "*.c" -exec grep " _exit(int" /dev/null {} \; > > $ find /usr/src -name *.c | grep exit > /usr/src/sys/kern/kern_exit.c > /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c > /usr/src/lib/libc/arm/aeabi/aeabi_atexit.c > /usr/src/lib/libc/stdlib/cxa_thread_atexit.c > /usr/src/lib/libc/stdlib/cxa_thread_atexit_impl.c > /usr/src/lib/libc/stdlib/exit.c > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The original question was about _exit(2) syscall, not exit(3). WRT the _exit(2), it's marked as "PSEUDO" and relevant PSEUDO macro is defined in lib/libc/<arch>/SYS.h (if I'm reading it all correctly).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8ef73fb7-dc2f-2fcb-f8e6-e7de02a66b64>