/sys$common/syshlp/helplib.hlb CC, Run-time functions, exit, _exit *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Terminate execution of the program from which they are called. These functions are nonreentrant. They are also identical; the _exit function is retained for reasons of compatibility with VAX C. The status argument corresponds with an errno value if exiting from a child process using vfork and/or an exec function, or with an OpenVMS condition value if exiting from a process invoked by DCL. The errno values are defined in the <errno.h> header file. A status value of 0 or EXIT_SUCCESS is translated to the OpenVMS SS$_NORMAL status code to return the OpenVMS success value. Any other status value is left the same. The status value is passed to the parent process. A status value of EXIT_FAILURE is translated to an error-level exit status. If the process was invoked by the DIGITAL Command Language (DCL), the status is interpreted by DCL and a message is displayed. If the process was a child process created using vfork or an exec function, then the child process is executed and control returns to the parent. The exit and _exit functions make use of the $EXIT system service. If your process is being invoked by the RUN command using any of the hibernation and scheduled wakeup qualifiers, the process might not correctly return to hibernation state when an exit or _exit call is made. Syntax: #include <stdlib.h> void exit(int status) #include <unistd.h> void _exit(int status);
|