Available in

(1) (1)/ko (1)/zh_CN (1)/zh_TW (1grass) (1posix) (2) (2)/de (2)/es (2)/fr (2)/ja (2)/ko (2)/nl (2)/pl (3) (3)/cs (3)/de (3)/es (3)/fr (3)/it (3)/ja (3)/pl (3)/pt (3)/zh_CN (3)/zh_TW (3c) (3posix) (3tcl) (3tcl)/zh_CN (3tcl)/zh_TW (7) (n)

TOC

exit(3C)                 Standard C Library Functions                 exit(3C)



NAME

       exit, _exithandle - terminate process

SYNOPSIS

       #include <stdlib.h>

       void exit(int status);

       void _exithandle(void);

DESCRIPTION

       The exit() function terminates a process by calling first _exithandle()
       and then _exit() (see exit(2)).

       The  _exithandle() function calls any functions registered through  the
       atexit(3C)  function  in  the reverse order of their registration. This
       action includes executing all finalization code from the .fini sections
       of all objects that are part of the process.

       The  _exithandle()  function is intended for use only with _exit(), and
       allows for specialized processing such as dldump(3DL) to be  performed.
       Normal  process  execution  should  not  be  continued  after a call to
       _exithandle() has occurred, as internal data structures may  have  been
       torn down due to atexit() or .fini processing.

       The  symbols  EXIT_SUCCESS  and  EXIT_FAILURE are defined in the header
       <stdlib.h> and may be used as the value of status to indicate  success‐
       ful or unsuccessful termination, respectively.

ATTRIBUTES

       See attributes(5) for descriptions of the following attributes:


       +-----------------------------+-----------------------------+
       |      ATTRIBUTE TYPE         |      ATTRIBUTE VALUE        |
       +-----------------------------+-----------------------------+
       |MT-Level                     |Safe                         |
       +-----------------------------+-----------------------------+

SEE ALSO

       exit(2), atexit(3C), dldump(3DL), attributes(5)



SunOS 5.9                         18 Apr 1997                         exit(3C)

COMMENTS

Add your comment here. Whitespace and linebreaks are preserved. URLs are linked automatically.
CAPTCHA

No HTML allowed. URLs will be linked with nofollow attribute. Whitespace is preserved.