opnsense-src/libexec/rtld-elf/rtld-libc
Brooks Davis e7e964cb2e syscalls: normalize _exit(2) declerations
exit(3) is implemented by the runtime and performs a number of shutdown
actions before ultimately calling _exit(2) to terminate the program.  We
historically named the syscall table entry `exit` rather than `_exit`,
but this requires special handling in libc/libsys to cause the `_exit`
symbol to exist while implementing `exit` in libc.

Declare the syscall as `_exit` and flow that through the system.

Because syscall(SYS_exit, code) is fairly widely used, allow a
configured extra line in syscall.h to define SYS_exit to SYS__exit.

I've found no external uses of __sys_exit() so I've not bothered to
create a compatability version of this private symbol.

Reviewed by:	imp, kib, emaste
Differential Revision:	https://reviews.freebsd.org/D51672
2025-08-08 10:30:16 +01:00
..
libc_private.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
Makefile.inc rtld: fix dependencies for rtld-libc 2025-08-08 10:30:16 +01:00
namespace.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
rtld_libc.c rtld: remove pointless "extern" 2024-02-21 02:26:10 +02:00
rtld_libc.h syscalls: normalize _exit(2) declerations 2025-08-08 10:30:16 +01:00
un-namespace.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00