

_exit()                COHERENT System Call               _exit()




Terminate a program

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 terminates  a program directly.   It returns _s_t_a_t_u_s  to the
calling program,  and exits.   Unlike the library  function exit,
_exit  does  not  perform  extra  termination  cleanup,  such  as
flushing buffered files and closing open files.

_exit should  be used  only in situations  where you do  _n_o_t want
buffers flushed  or files closed.   For example, you  may wish to
call _exit if your program detects an irreparable error condition
and you want  to ``bail out'' to keep your  data files from being
corrupted.

_exit should  also be used  with programs that do  not use STDIO.
Unlike exit, _exit does not use STDIO.  This will help you create
programs that are extremely small when compiled.

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

close(), COHERENT system calls, wait()

***** Notes *****

If a  program leaves  main() by  an error condition,  contents of
register AX becomes  the exit code.  Usually, these register con-
tents are  random.  If you want to test  a program's return code,
you must to exit or return from main().



























COHERENT Lexicon                                           Page 1


