www.delorie.com/djgpp/doc/libc/libc_298.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

exit

Syntax

 
#include <stdlib.h>

void exit(int exit_code);

Description

This function exits the program, returning exit_code to the calling process. Before exiting, all open files are closed and all atexit and on_exit requests are processed.

Return Value

This function does not return.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
if (argc < 4)
{
  print_usage();
  exit(1);
}


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004