#include <unistd.h> void _exit(int status);
_exitends the current process.
statusis the return status for the process.
_exit closes open file descriptors and directory streams in the
calling process. If the parent of the calling process is suspended by
waitpid, the low-order eight bits of
are available to the parent. Otherwise, the parent process
saves the value of
status to return to the parent in the event
signal is sent to the
_exit does not directly terminate child processes.
Child processes that continue after the
parent process ends receive a new parent process ID of 1.
_exit does not perform C run-time
library cleanup; standard I/O stream buffers are not flushed,
atexit routines are not called.
_exitis always successful. It does not return a value.
#include <unistd.h> #include <stdio.h> . . . fflush(NULL); _exit(0); . . .
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.