-/* $OpenBSD: wait.c,v 1.5 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: wait.c,v 1.6 2015/10/25 19:15:56 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
-#include <sys/resource.h>
pid_t
wait(int *istat)
{
- return (wait4(WAIT_ANY, istat, 0, (struct rusage *)0));
+ return (wait4(WAIT_ANY, istat, 0, NULL));
}
-/* $OpenBSD: wait3.c,v 1.5 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: wait3.c,v 1.6 2015/10/25 19:15:56 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/types.h>
-#include <sys/time.h>
#include <sys/wait.h>
-#include <sys/resource.h>
pid_t
wait3(int *istat, int options, struct rusage *rup)
-/* $OpenBSD: waitpid.c,v 1.6 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: waitpid.c,v 1.7 2015/10/25 19:15:56 guenther Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
-#include <sys/resource.h>
pid_t
waitpid(pid_t pid, int *istat, int options)
{
- return (wait4(pid, istat, options, (struct rusage *)0));
+ return (wait4(pid, istat, options, NULL));
}
+DEF_WEAK(waitpid);
--- /dev/null
+/* $OpenBSD: wait.h,v 1.1 2015/10/25 19:15:56 guenther Exp $ */
+/*
+ * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_SYS_WAIT_H_
+#define _LIBC_SYS_WAIT_H_
+
+#include_next <sys/wait.h>
+
+PROTO_DEPRECATED(wait);
+PROTO_NORMAL(waitpid);
+PROTO_DEPRECATED(wait3);
+/*PROTO_CANCEL(wait4);*/
+
+#endif /* !_LIBC_SYS_WAIT_H_ */