exit(3C)
NAME
exit − terminate a process normally.
SYNOPSIS
int exit (status)
int status ;
DESCRIPTION
exit causes normal program termination. First exit calls the functions registered by atexit(3C) in the reverse order of their registration. Then all open output streams are flushed and all open streams are closed (see stdio(3S)). Finally the program is terminated and the status returned to the parent process by calling the _exit function (see exit(2)).
SEE ALSO
abort(3C), atexit(3C), exit(2), stdio(3S).
CX/UX Programmer’s Reference Manual