[Midnightbsd-cvs] src [10508] trunk/lib/libc/sys/wait6.c: update wait
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jun 6 22:10:46 EDT 2018
Revision: 10508
http://svnweb.midnightbsd.org/src/?rev=10508
Author: laffer1
Date: 2018-06-06 22:10:46 -0400 (Wed, 06 Jun 2018)
Log Message:
-----------
update wait
Modified Paths:
--------------
trunk/lib/libc/sys/wait.2
Added Paths:
-----------
trunk/lib/libc/sys/wait4.c
trunk/lib/libc/sys/wait6.c
Property Changed:
----------------
trunk/lib/libc/sys/wait.2
Modified: trunk/lib/libc/sys/wait.2
===================================================================
--- trunk/lib/libc/sys/wait.2 2018-06-07 02:09:33 UTC (rev 10507)
+++ trunk/lib/libc/sys/wait.2 2018-06-07 02:10:46 UTC (rev 10508)
@@ -26,9 +26,10 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)wait.2 8.2 (Berkeley) 4/19/94
+.\" $FreeBSD: stable/10/lib/libc/sys/wait.2 264170 2014-04-05 20:09:51Z jilles $
.\" $MidnightBSD$
.\"
-.Dd November 10, 2012
+.Dd September 7, 2013
.Dt WAIT 2
.Os
.Sh NAME
@@ -48,7 +49,7 @@
.Fn wait "int *status"
.Ft pid_t
.Fn waitpid "pid_t wpid" "int *status" "int options"
-.In sys/signal.h
+.In signal.h
.Ft int
.Fn waitid "idtype_t idtype" "id_t id" "siginfo_t *info" "int options"
.In sys/time.h
@@ -604,9 +605,23 @@
The
.Fn WCOREDUMP
macro
-and the ability to restart a pending
-.Fn wait
-call are extensions to the POSIX interface.
+is an extension to the POSIX interface.
+.Pp
+The ability to use the
+.Dv WNOWAIT
+flag with
+.Fn waitpid
+is an extension;
+.Tn POSIX
+only permits this flag with
+.Fn waitid .
+.Pp
+.Tn POSIX
+requires
+.Fn waitid
+to return the full 32 bits passed to
+.Xr _exit 2 ;
+this implementation only returns 8 bits like in the other calls.
.Sh HISTORY
The
.Fn wait
Property changes on: trunk/lib/libc/sys/wait.2
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: trunk/lib/libc/sys/wait4.c
===================================================================
--- trunk/lib/libc/sys/wait4.c (rev 0)
+++ trunk/lib/libc/sys/wait4.c 2018-06-07 02:10:46 UTC (rev 10508)
@@ -0,0 +1,50 @@
+/* $MidnightBSD$ */
+/*
+ * Copyright (c) 2014 The FreeBSD Foundation.
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Konstantin Belousov
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice(s), this list of conditions and the following disclaimer as
+ * the first lines of this file unmodified other than the possible
+ * addition of one or more copyright notices.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice(s), this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: stable/10/lib/libc/sys/wait4.c 277317 2015-01-18 11:54:20Z kib $");
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include "libc_private.h"
+
+__weak_reference(__sys_wait4, __wait4);
+
+#pragma weak wait4
+pid_t
+wait4(pid_t pid, int *status, int options, struct rusage *ru)
+{
+
+ return (((pid_t (*)(pid_t, int *, int, struct rusage *))
+ __libc_interposing[INTERPOS_wait4])(pid, status, options, ru));
+}
Property changes on: trunk/lib/libc/sys/wait4.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/lib/libc/sys/wait6.c
===================================================================
--- trunk/lib/libc/sys/wait6.c (rev 0)
+++ trunk/lib/libc/sys/wait6.c 2018-06-07 02:10:46 UTC (rev 10508)
@@ -0,0 +1,53 @@
+/* $MidnightBSD$ */
+/*
+ * Copyright (c) 2015 The FreeBSD Foundation.
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Konstantin Belousov
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice(s), this list of conditions and the following disclaimer as
+ * the first lines of this file unmodified other than the possible
+ * addition of one or more copyright notices.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice(s), this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: stable/10/lib/libc/sys/wait6.c 281981 2015-04-25 08:14:08Z kib $");
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include "libc_private.h"
+
+__weak_reference(__sys_wait6, __wait6);
+
+#pragma weak wait6
+pid_t
+wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *ru,
+ siginfo_t *infop)
+{
+
+ return (((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *,
+ siginfo_t *))__libc_interposing[INTERPOS_wait6])(idtype, id,
+ status, options, ru, infop));
+}
Property changes on: trunk/lib/libc/sys/wait6.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list