File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / lib / libc / tahoe / sys / wait3.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

/*	@(#)wait3.c	4.2	(Berkeley)	12/28/82	*/

/*
 * C library -- wait3
 *
 * pid = wait3(&status, flags, &rusage);
 *
 * pid == -1 if error
 * status indicates fate of process, if given
 * flags may indicate process is not to hang or
 * that untraced stopped children are to be reported.
 * rusage optionally returns detailed resource usage information
 */
#include "SYS.h"

#define	SYS_wait3	SYS_wait

ENTRY(wait3)
	movl	8(fp),r0	/* make it easy for system to get */
	movl	12(fp),r1	/* these extra arguments */
	bispsw	$0xf		/* flags wait3() (N,Z,V,C)*/
	kcall	$SYS_wait3
	bcc 	noerror
	movl	r0,_errno
	mnegl	$1,r0
	ret
noerror:
	tstl	4(fp)		/* status desired? */
	beql	nostatus	/* no */
	movl	r1,*4(fp)	/* store child's status */
nostatus:
	ret

unix.superglobalmegacorp.com

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