diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-06-13 23:24:03 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-06-13 23:24:03 +0000 |
commit | d062d3ddec032d9bf47a3847838bb28297ab91aa (patch) | |
tree | ca56138942fa20997e299c679e0ff97bce9586a7 /newlib/libc/stdlib/_Exit.c | |
parent | 5cf8f50a538c160c4ff3575d9e46676a0a7b47ec (diff) | |
download | cygnal-d062d3ddec032d9bf47a3847838bb28297ab91aa.tar.gz cygnal-d062d3ddec032d9bf47a3847838bb28297ab91aa.tar.bz2 cygnal-d062d3ddec032d9bf47a3847838bb28297ab91aa.zip |
2002-06-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdlib.h: Add _Exit prototype.
* libc/stdlib/Makefile.am: Add _Exit.c support.
* libc/stdlib/Makefile.in: Ditto.
* libc/stdlib/_Exit.c: New file.
Diffstat (limited to 'newlib/libc/stdlib/_Exit.c')
-rw-r--r-- | newlib/libc/stdlib/_Exit.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/_Exit.c b/newlib/libc/stdlib/_Exit.c new file mode 100644 index 000000000..3f189a21f --- /dev/null +++ b/newlib/libc/stdlib/_Exit.c @@ -0,0 +1,46 @@ +/* +FUNCTION +<<_Exit>>---end program execution with no cleanup processing + +INDEX + _Exit + +ANSI_SYNOPSIS + #include <stdlib.h> + void _Exit(int <[code]>); + +TRAD_SYNOPSIS + #include <stdlib.h> + void _Exit(<[code]>) + int <[code]>; + +DESCRIPTION +Use <<_Exit>> to return control from a program to the host operating +environment. Use the argument <[code]> to pass an exit status to the +operating environment: two particular values, <<EXIT_SUCCESS>> and +<<EXIT_FAILURE>>, are defined in `<<stdlib.h>>' to indicate success or +failure in a portable fashion. + +<<_Exit>> differs from <<exit>> in that it does not run any +application-defined cleanup functions registered with <<atexit>> and +it does not clean up files and streams. It is identical to <<_exit>>. + +RETURNS +<<_Exit>> does not return to its caller. + +PORTABILITY +<<_Exit>> is defined by the C99 standard. + +Supporting OS subroutines required: <<_exit>>. +*/ + +#include <stdlib.h> +#include <unistd.h> /* for _exit() declaration */ +#include <reent.h> + +void +_DEFUN (_Exit, (code), + int code) +{ + _exit (code); +} |