

exit()                   General Function                  exit()




Terminate a program gracefully

vvooiidd eexxiitt(_s_t_a_t_u_s) iinntt _s_t_a_t_u_s;

exit  is  the  normal method  to  terminate  a program  directly.
status information  is passed to the  parent process.  By conven-
tion, an  exit status of zero indicates  success, whereas an exit
status  greater  than  zero  indicates  failure.  If  the  parent
process issued a wait call, it is notified of the termination and
is passed  the least significant  eight bits of  status.  As exit
never returns, it is always successful.  Unlike the related func-
tion _exit,  exit does extra  cleanup, such as  flushing buffered
files and closing open files.

***** Example *****

For an example of this function, see the entry for ffooppeenn.

***** See Also *****

_exit(), close(), general functions, wait()



































COHERENT Lexicon                                           Page 1


