summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/_Exit.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>2002-09-10 02:04:49 +0000
committerwollman <wollman@FreeBSD.org>2002-09-10 02:04:49 +0000
commitab723a2a1b1c6f1edd706d2a0e0fb1cd93d9308f (patch)
treea88678f5332186a1bd2a23ff99d0b5dbfd9fed66 /lib/libc/stdlib/_Exit.c
parent3c4b3f0c500ab6b3e8bd2ab5b555c68499211ca4 (diff)
downloadFreeBSD-src-ab723a2a1b1c6f1edd706d2a0e0fb1cd93d9308f.zip
FreeBSD-src-ab723a2a1b1c6f1edd706d2a0e0fb1cd93d9308f.tar.gz
Implement C99's _Exit() interface.
Implement a version of qsort that provides a thunk to the comparison function. Update manual pages.
Diffstat (limited to 'lib/libc/stdlib/_Exit.c')
-rw-r--r--lib/libc/stdlib/_Exit.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libc/stdlib/_Exit.c b/lib/libc/stdlib/_Exit.c
new file mode 100644
index 0000000..e7f0f51
--- /dev/null
+++ b/lib/libc/stdlib/_Exit.c
@@ -0,0 +1,22 @@
+/*
+ * This file is in the public domain. Written by Garrett A. Wollman,
+ * 2002-09-07.
+ *
+ * $FreeBSD$
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+
+/*
+ * ISO C99 added this function to provide for Standard C applications
+ * which needed something like POSIX _exit(). A new interface was created
+ * in case it turned out that _exit() was insufficient to meet the
+ * requirements of ISO C. (That's probably not the case, but here
+ * is where you would put the extra code if it were.)
+ */
+void
+_Exit(int code)
+{
+ _exit(code);
+}
OpenPOWER on IntegriCloud