waitpid.c revision 56698
1139749Simp/* 2139749Simp * Copyright (c) 1988, 1993 3139749Simp * The Regents of the University of California. All rights reserved. 4127827Swes * 5127827Swes * Redistribution and use in source and binary forms, with or without 6127827Swes * modification, are permitted provided that the following conditions 7127827Swes * are met: 8127827Swes * 1. Redistributions of source code must retain the above copyright 9127827Swes * notice, this list of conditions and the following disclaimer. 10127827Swes * 2. Redistributions in binary form must reproduce the above copyright 11127827Swes * notice, this list of conditions and the following disclaimer in the 12127827Swes * documentation and/or other materials provided with the distribution. 13127827Swes * 3. All advertising materials mentioning features or use of this software 14127827Swes * must display the following acknowledgement: 15127827Swes * This product includes software developed by the University of 16127827Swes * California, Berkeley and its contributors. 17127827Swes * 4. Neither the name of the University nor the names of its contributors 18127827Swes * may be used to endorse or promote products derived from this software 19127827Swes * without specific prior written permission. 20127827Swes * 21127827Swes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22127827Swes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23127827Swes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24127827Swes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25119917Swpaul * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26119917Swpaul * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27119917Swpaul * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28119917Swpaul * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29119917Swpaul * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30119917Swpaul * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31119917Swpaul * SUCH DAMAGE. 32119917Swpaul * 33119917Swpaul * $FreeBSD: head/lib/libc/gen/waitpid.c 56698 2000-01-27 23:07:25Z jasone $ 34119917Swpaul */ 35119917Swpaul 36119917Swpaul#if defined(LIBC_SCCS) && !defined(lint) 37119917Swpaulstatic char sccsid[] = "@(#)waitpid.c 8.1 (Berkeley) 6/4/93"; 38119917Swpaul#endif /* LIBC_SCCS and not lint */ 39119917Swpaul 40119917Swpaul#include <sys/types.h> 41119917Swpaul#include <sys/time.h> 42119917Swpaul#include <sys/wait.h> 43119917Swpaul#include <sys/resource.h> 44119917Swpaul 45119917Swpaulpid_t 46119917Swpaul#if __STDC__ 47119917Swpaul__waitpid(pid_t pid, int *istat, int options) 48119917Swpaul#else 49119917Swpaul__waitpid(pid, istat, options) 50119917Swpaul pid_t pid; 51119917Swpaul int *istat; 52119917Swpaul int options; 53119917Swpaul#endif 54119917Swpaul{ 55119917Swpaul return (wait4(pid, istat, options, (struct rusage *)0)); 56119917Swpaul} 57119917Swpaul 58119917Swpaul__weak_reference(__waitpid, waitpid); 59119917Swpaul