1exit(3C)                 Standard C Library Functions                 exit(3C)
2
3
4

NAME

6       exit, _exithandle - terminate process
7

SYNOPSIS

9       #include <stdlib.h>
10
11       void exit(int status);
12
13
14       void _exithandle(void);
15
16

DESCRIPTION

18       The exit() function terminates a process by calling first _exithandle()
19       and then _exit() (see exit(2)).
20
21
22       The  _exithandle() function calls any functions registered through  the
23       atexit(3C)  function  in  the reverse order of their registration. This
24       action includes executing all finalization code from the .fini sections
25       of all objects that are part of the process.
26
27
28       The  _exithandle()  function is intended for use only with _exit(), and
29       allows for specialized processing such as dldump(3C) to  be  performed.
30       Normal  process  execution  should  not  be  continued  after a call to
31       _exithandle() has occurred, as internal data structures may  have  been
32       torn down due to atexit() or .fini processing.
33
34
35       The  symbols  EXIT_SUCCESS  and  EXIT_FAILURE are defined in the header
36       <stdlib.h> and may be used as the value of status to indicate  success‐
37       ful or unsuccessful termination, respectively.
38

ATTRIBUTES

40       See attributes(5) for descriptions of the following attributes:
41
42
43
44
45       ┌─────────────────────────────┬─────────────────────────────┐
46       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
47       ├─────────────────────────────┼─────────────────────────────┤
48       │MT-Level                     │Safe                         │
49       └─────────────────────────────┴─────────────────────────────┘
50

SEE ALSO

52       exit(2), atexit(3C), dldump(3C), attributes(5), standards(5)
53
54
55
56SunOS 5.11                        1 Mar 2004                          exit(3C)
Impressum