3 exits, _exits, atexit, atexitdont, terminate \- terminate process, process cleanup
11 void _exits(char *msg)
16 int atexit(void(*)(void))
18 void atexitdont(void(*)(void))
22 is the conventional way to terminate a process.
24 is the underlying system call.
29 conventionally includes a brief (maximum length
31 explanation of the reason for
32 exiting, or a null pointer or empty string to indicate normal termination.
33 The string is passed to the parent process, prefixed by the name and process
34 id of the exiting process, when the parent does a
43 calls in reverse order all the functions
50 as a function to be called by
52 It returns zero if it failed,
54 A typical use is to register a cleanup routine for an I/O package.
55 To simplify programs that fork or share memory,
58 .IR atexit -registered
59 functions that were registered by the same
60 process as that calling
65 twice (or more) with the same function argument causes
67 to invoke the function twice (or more).
69 There is a limit to the number of exit functions
70 that will be recorded;
72 returns 0 if that limit has been reached.
75 cancels a previous registration of an exit function.
77 .B /sys/src/libc/port/exits.c
79 .B /sys/src/libc/port/atexit.c