Annotation of cci/usr/src/man/man2/exit.2, revision 1.1.1.1

1.1       root        1: .TH EXIT 2 
                      2: .SH NAME
                      3: exit, _exit \- terminate process
                      4: .SH SYNOPSIS
                      5: .B void exit (status)
                      6: .br
                      7: .B int status;
                      8: .br
                      9: .B void _exit (status)
                     10: .br
                     11: .B int status;
                     12: .SH DESCRIPTION
                     13: .I Exit\^
                     14: terminates the calling process with the following consequences:
                     15: .IP
                     16: All of the file descriptors open in the calling process are closed.
                     17: .IP
                     18: If the parent process of the calling process is executing a
                     19: .IR wait ,
                     20: it is notified of the calling process's
                     21: termination and the low order eight bits (i.e., bits 0377) of
                     22: .I status\^
                     23: are made available to it; see
                     24: .IR wait (2).
                     25: .IP
                     26: If the parent process of the calling process is not executing a
                     27: .IR wait ,
                     28: the calling process is transformed into a zombie process.
                     29: A
                     30: .I "zombie process\^"
                     31: is a process that only occupies a slot in the process table.
                     32: It has no other space allocated either in user or kernel space.
                     33: The process table slot that it occupies is partially overlaid with
                     34: time accounting information
                     35: (see
                     36: .BR <sys/proc.h> )
                     37: to be used by
                     38: .IR times.
                     39: .IP
                     40: The parent process
                     41: .SM ID
                     42: of all of the calling process's existing
                     43: child processes  and zombie processes is set to 1.
                     44: This means the initialization process (see
                     45: .IR intro (2))
                     46: inherits each of these processes.
                     47: .IP
                     48: Each attached shared memory segment is detached and the value of
                     49: .B shm_nattach
                     50: in the data structure associated with its shared memory identifier
                     51: is decremented by 1.
                     52: .IP
                     53: For each semaphore for which the calling process has set a semadj value (see
                     54: .IR semop (2)),
                     55: that semadj value is added to the semval of the specified semaphore.
                     56: .IP
                     57: If the process has a process, text, or data lock, an
                     58: .I unlock\^
                     59: is performed (see
                     60: .IR plock (2)).
                     61: .IP
                     62: An accounting record is written on the accounting file if the system's 
                     63: accounting routine is enabled; see
                     64: .IR acct\^ (2).
                     65: .PP
                     66: The C function
                     67: .I exit\^
                     68: may cause cleanup actions before the process exits.
                     69: The function
                     70: .I _exit\^
                     71: circumvents all cleanup.
                     72: .SH NOTES
                     73: This manual page replaces the 4.2BSD manual page.
                     74: .SH "SEE ALSO"
                     75: acct(2), intro(2), plock(2), semop(2), signal(2), wait(2).
                     76: .\"    @(#)exit.2      6.2 of 9/6/83

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.