 | | The exit function is a library routine, defined by ANSI C, that closes all the Standard I/O Library streams the process has open, and then calls another function, _exit. The _exit function does a number of things, including closing all the process' open files, sending a SIGCHLD signal to the parent process, setting the process' child processes' parent process IDs to 1, freeing up any interprocess communication resources used by the process, and so forth. The reason that these chores are not performed by exit itself is that ANSI C does not specify operating system-dependent functionality, and thus cannot specify everything exit should do. | |
|