Annotation of 43BSD/lib/libc/vax/sys/wait3.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1983 Regents of the University of California.
                      3:  * All rights reserved.  The Berkeley software License Agreement
                      4:  * specifies the terms and conditions for redistribution.
                      5:  */
                      6: 
                      7: #ifdef SYSLIBC_SCCS
                      8: _sccsid:.asciz "@(#)wait3.c    5.3 (Berkeley) 3/9/86"
                      9: #endif SYSLIBC_SCCS
                     10: 
                     11: /*     @(#)wait3.c     5.3     (Berkeley)      3/9/86  */
                     12: 
                     13: /*
                     14:  * C library -- wait3
                     15:  *
                     16:  * pid = wait3(&status, flags, &rusage);
                     17:  *
                     18:  * pid == -1 if error
                     19:  * status indicates fate of process, if given
                     20:  * flags may indicate process is not to hang or
                     21:  * that untraced stopped children are to be reported.
                     22:  * rusage optionally returns detailed resource usage information
                     23:  */
                     24: #include "SYS.h"
                     25: 
                     26: #define        SYS_wait3       SYS_wait
                     27: 
                     28: ENTRY(wait3)
                     29:        movl    8(ap),r0        /* make it easy for system to get */
                     30:        movl    12(ap),r1       /* these extra arguments */
                     31:        bispsw  $0xf            /* flags wait3() */
                     32:        chmk    $SYS_wait3
                     33:        bcc     noerror
                     34:        movl    r0,_errno
                     35:        mnegl   $1,r0
                     36:        ret
                     37: noerror:
                     38:        tstl    4(ap)           /* status desired? */
                     39:        beql    nostatus        /* no */
                     40:        movl    r1,*4(ap)       /* store child's status */
                     41: nostatus:
                     42:        ret

unix.superglobalmegacorp.com

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