From ec47889776b306f56c691ad8120367908f17299e Mon Sep 17 00:00:00 2001 From: millert <> Date: Mon, 3 May 2004 17:21:13 +0000 Subject: Add _Exit(3) as per C99. Discussed with espie@ some time ago. --- src/lib/libc/stdlib/_Exit.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/lib/libc/stdlib/_Exit.c (limited to 'src/lib/libc/stdlib/_Exit.c') 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 @@ +/* $OpenBSD: _Exit.c,v 1.1 2004/05/03 17:21:13 millert Exp $ */ + +/* + * Placed in the public domain by Todd C. Miller on January 21, 2004. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char *rcsid = "$OpenBSD: _Exit.c,v 1.1 2004/05/03 17:21:13 millert Exp $"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +/* + * _Exit() is the ISO/ANSI C99 equivalent of the POSIX _exit() function. + * No atexit() handlers are called and no signal handlers are run. + * Whether or not stdio buffers are flushed or temporary files are removed + * is implementation-dependent. As such it is safest to *not* flush + * stdio buffers or remove temporary files. This is also consistent + * with most other implementations. + */ +void +_Exit(int status) +{ + _exit(status); +} -- cgit v1.2.3-55-g6feb