_exit
raw OCR
Terminates program.
Defined in header <stdlib.h>
Syntax
#include <stdlib.h>
void _exit(int status);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ | ■ |
Remarks
_exit terminates execution without closing any files, flushing any output, or calling any exit functions.
The calling process uses status as the exit status of the process. Typically a value of 0 is used to indicate a normal exit, and a nonzero value indicates some error.
Return value
None.
See also
Example
#include <stdlib.h>
#include <stdio.h>
void done (void);
int main (void)
{
atexit (done);
_exit(0) ;
return 0;
}
void done( )
{
printf ("hello\n");
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Extraction notes
- heading `exit` read as `_exit`
Stable link: /3.1/stdlib.h/_exit/
· short form /3.1/_exit/