summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/_Exit.c
diff options
context:
space:
mode:
authormillert <>2004-05-03 17:21:13 +0000
committermillert <>2004-05-03 17:21:13 +0000
commitec47889776b306f56c691ad8120367908f17299e (patch)
tree9c6d4f28de6cc1195e43c8c46792240d297c5c78 /src/lib/libc/stdlib/_Exit.c
parentc81aca6074576d87ed097daa64164db3977c2b8b (diff)
downloadopenbsd-ec47889776b306f56c691ad8120367908f17299e.tar.gz
openbsd-ec47889776b306f56c691ad8120367908f17299e.tar.bz2
openbsd-ec47889776b306f56c691ad8120367908f17299e.zip
Add _Exit(3) as per C99. Discussed with espie@ some time ago.
Diffstat (limited to 'src/lib/libc/stdlib/_Exit.c')
-rw-r--r--src/lib/libc/stdlib/_Exit.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/libc/stdlib/_Exit.c b/src/lib/libc/stdlib/_Exit.c
new file mode 100644
index 0000000000..784015a21d
--- /dev/null
+++ b/src/lib/libc/stdlib/_Exit.c
@@ -0,0 +1,26 @@
1/* $OpenBSD: _Exit.c,v 1.1 2004/05/03 17:21:13 millert Exp $ */
2
3/*
4 * Placed in the public domain by Todd C. Miller on January 21, 2004.
5 */
6
7#if defined(LIBC_SCCS) && !defined(lint)
8static char *rcsid = "$OpenBSD: _Exit.c,v 1.1 2004/05/03 17:21:13 millert Exp $";
9#endif /* LIBC_SCCS and not lint */
10
11#include <stdlib.h>
12#include <unistd.h>
13
14/*
15 * _Exit() is the ISO/ANSI C99 equivalent of the POSIX _exit() function.
16 * No atexit() handlers are called and no signal handlers are run.
17 * Whether or not stdio buffers are flushed or temporary files are removed
18 * is implementation-dependent. As such it is safest to *not* flush
19 * stdio buffers or remove temporary files. This is also consistent
20 * with most other implementations.
21 */
22void
23_Exit(int status)
24{
25 _exit(status);
26}