Annotation of researchv10dc/man/adm/man2/exit.2, revision 1.1

1.1     ! root        1: .TH EXIT 2
        !             2: .CT 2 time_man proc_man
        !             3: .SH NAME
        !             4: _exit, wait wait3 \(mi terminate process, wait for child to terminate
        !             5: .SH SYNOPSIS
        !             6: .nf
        !             7: .B void _exit(status)
        !             8: .B int status;
        !             9: .PP
        !            10: .B int wait(status)
        !            11: .B int *status;
        !            12: .PP
        !            13: .B int wait((int *)0)
        !            14: .PP
        !            15: .B #include <sys/vtimes.h>
        !            16: .PP
        !            17: .B wait3(status, options, ch_vt)
        !            18: .B int *status;
        !            19: .B struct vtimes *ch_vt;
        !            20: .fi
        !            21: .SH DESCRIPTION
        !            22: .I _exit
        !            23: closes all the process's files and notifies the parent process
        !            24: when the parent executes
        !            25: .IR wait .
        !            26: The low-order 8 bits of
        !            27: .I status
        !            28: are available to the parent process.
        !            29: The call never returns.
        !            30: .PP
        !            31: The function
        !            32: .IR exit (3),
        !            33: which is the normal means of terminating a process,
        !            34: may cause cleanup actions before finally calling
        !            35: .IR _exit .
        !            36: Therefore,
        !            37: .I _exit
        !            38: should be called to terminate a child
        !            39: process after a
        !            40: .IR fork (2)
        !            41: to avoid flushing buffered output twice.
        !            42: .PP
        !            43: .I Wait
        !            44: delays until a signal is received or until
        !            45: a child processes terminates or receives signal
        !            46: .BR SIGSTOP  .
        !            47: There is no delay if any child has died since the last
        !            48: .I wait,
        !            49: or if there are no extant children.
        !            50: The normal return yields the process id 
        !            51: and status of one terminated child.
        !            52: The status of other children 
        !            53: may be learned from further
        !            54: .I wait
        !            55: calls.
        !            56: .PP
        !            57: If
        !            58: .I status
        !            59: is nonzero,
        !            60: .I wait
        !            61: sets
        !            62: .IR \f5*\fPstatus " = (" s <<8)+ t
        !            63: where
        !            64: .I s
        !            65: is the low 8 bits
        !            66: of
        !            67: .I status
        !            68: from the child's
        !            69: .IR exit ,
        !            70: if any,
        !            71: and
        !            72: .I t
        !            73: is the termination status of the child.
        !            74: See
        !            75: .IR signal (2)
        !            76: for a list of termination statuses (signals);
        !            77: status 0 indicates normal termination, 0177
        !            78: a (restartable) process stopped on
        !            79: .BR SIGSTOP .
        !            80: If the 0200
        !            81: bit of the termination status
        !            82: is set,
        !            83: a core image of the process was produced
        !            84: by the system.
        !            85: .PP
        !            86: .I Wait3
        !            87: is similar to
        !            88: .I wait.
        !            89: An
        !            90: .I option
        !            91: value of 1 prevents waiting for extant, non-stopped children.
        !            92: If
        !            93: .I ch_vt
        !            94: is nonzero, resource usage data for the child are reported
        !            95: as by
        !            96: .IR vtimes (2).
        !            97: .PP
        !            98: If the parent process terminates without
        !            99: waiting on its children,
        !           100: they are inherited by
        !           101: process 1
        !           102: (the initialization process, 
        !           103: .IR init (8)).
        !           104: .SH "SEE ALSO"
        !           105: .IR fork (2), 
        !           106: .IR exit (3),
        !           107: .IR signal (2), 
        !           108: .IR sh (1)
        !           109: .SH DIAGNOSTICS
        !           110: .IR wait ,
        !           111: .IR wait3 :
        !           112: .B ECHILD
        !           113: .SH BUGS
        !           114: If the argument to
        !           115: .I wait
        !           116: is bogus, the user program gets a memory fault rather than an
        !           117: .BR EFAULT .
        !           118: .br
        !           119: The 0 third argument to
        !           120: .I wait3
        !           121: is a required historical dreg.

unix.superglobalmegacorp.com

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