Renamed include file aros/_timeval.h to aros/types/timeval_s.h.
[AROS.git] / compiler / clib / _exit.c
blobf72337230c5a84298ad3bdf2e78d06075d7b7561
1 /*
2 Copyright © 2003, The AROS Development Team. All rights reserved.
3 $Id$
5 POSIX function _exit().
6 */
8 #include "__arosc_privdata.h"
10 #include <exec/types.h>
11 #include <setjmp.h>
12 #include <aros/startup.h>
14 /*****************************************************************************
16 NAME */
17 #include <unistd.h>
19 void _exit (
21 /* SYNOPSIS */
22 int code)
24 /* FUNCTION
25 Terminates the running program immediately. The code is returned to
26 the program which has called the running program. In contrast to
27 exit(), this function does not call user exit-handlers added with
28 atexit() or on_exit(). It does, however, close open filehandles.
30 INPUTS
31 code - Exit code. 0 for success, other values for failure.
33 RESULT
34 None. This function does not return.
36 NOTES
37 This function must not be used in a shared library or in a threaded
38 application.
40 EXAMPLE
42 BUGS
43 Currently, this function *does* trigger user exit-handlers to be
44 called.
46 SEE ALSO
47 exit()
49 INTERNALS
51 ******************************************************************************/
53 __aros_startup_error = code;
55 longjmp (__aros_startup_jmp_buf, 1);
57 /* TODO: _exit() is not properly implemented */
59 /* never reached */
60 } /* _exit */