home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / stdlib / exit.txh < prev    next >
Encoding:
Text File  |  1995-07-17  |  507 b   |  30 lines

  1. @node exit, process
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdlib.h>
  6.  
  7. void exit(int exit_code);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function exits the program, returning @var{exit_code} to the
  13. calling process.  Before exiting, all open files are closed and all
  14. @code{atexit} and @code{on_exit} requests are processed. 
  15.  
  16. @subheading Return Value
  17.  
  18. This function does not return.
  19.  
  20. @subheading Example
  21.  
  22. @example
  23. if (argc < 4)
  24. @{
  25.   print_usage();
  26.   exit(1);
  27. @}
  28. @end example
  29.  
  30.