Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2. FUNCTION
  3. <<_Exit>>---end program execution with no cleanup processing
  4.  
  5. INDEX
  6.         _Exit
  7.  
  8. ANSI_SYNOPSIS
  9.         #include <stdlib.h>
  10.         void _Exit(int <[code]>);
  11.  
  12. TRAD_SYNOPSIS
  13.         #include <stdlib.h>
  14.         void _Exit(<[code]>)
  15.         int <[code]>;
  16.  
  17. DESCRIPTION
  18. Use <<_Exit>> to return control from a program to the host operating
  19. environment.  Use the argument <[code]> to pass an exit status to the
  20. operating environment: two particular values, <<EXIT_SUCCESS>> and
  21. <<EXIT_FAILURE>>, are defined in `<<stdlib.h>>' to indicate success or
  22. failure in a portable fashion.
  23.  
  24. <<_Exit>> differs from <<exit>> in that it does not run any
  25. application-defined cleanup functions registered with <<atexit>> and
  26. it does not clean up files and streams.  It is identical to <<_exit>>.
  27.  
  28. RETURNS
  29. <<_Exit>> does not return to its caller.
  30.  
  31. PORTABILITY
  32. <<_Exit>> is defined by the C99 standard.
  33.  
  34. Supporting OS subroutines required: <<_exit>>.
  35. */
  36.  
  37. #include <stdlib.h>
  38. #include <unistd.h>     /* for _exit() declaration */
  39. #include <reent.h>
  40.  
  41. void
  42. _DEFUN (_Exit, (code),
  43.         int code)
  44. {
  45.   _exit (code);
  46. }
  47.