Sun Apr 3 00:19:42 2016 UTC ()
userland bits for wait6/waitid.


(christos)
diff -r1.262 -r1.263 src/lib/libc/shlib_version
diff -r1.193 -r1.194 src/lib/libc/gen/Makefile.inc
diff -r0 -r1.1 src/lib/libc/gen/waitid.c
diff -r1.179 -r1.180 src/lib/libc/include/namespace.h
diff -r1.228 -r1.229 src/lib/libc/sys/Makefile.inc
diff -r1.27 -r1.28 src/lib/libc/sys/wait.2

cvs diff -r1.262 -r1.263 src/lib/libc/shlib_version (expand / switch to unified diff)

--- src/lib/libc/shlib_version 2016/01/14 20:42:29 1.262
+++ src/lib/libc/shlib_version 2016/04/03 00:19:42 1.263
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: shlib_version,v 1.262 2016/01/14 20:42:29 christos Exp $ 1# $NetBSD: shlib_version,v 1.263 2016/04/03 00:19:42 christos Exp $
2# Remember to update distrib/sets/lists/base/shl.* when changing 2# Remember to update distrib/sets/lists/base/shl.* when changing
3# 3#
4# things we wish to do on next major version bump: 4# things we wish to do on next major version bump:
5# - remove code under BUILD_LEGACY 5# - remove code under BUILD_LEGACY
6# - remove BCS code in citrus and replace it with use of the C locale 6# - remove BCS code in citrus and replace it with use of the C locale
7# - libc/net/rcmd.c: make __ivaliduser() and __ivaliduser_sa() static 7# - libc/net/rcmd.c: make __ivaliduser() and __ivaliduser_sa() static
8# - libc/net: resolver update to BIND8/9? 8# - libc/net: resolver update to BIND8/9?
9# - md2, md4, md5, rmd160 & sha1 functions should take the same arguments AFAP 9# - md2, md4, md5, rmd160 & sha1 functions should take the same arguments AFAP
10# - Crypto hashes have name overlap with libcrypto, rename them 10# - Crypto hashes have name overlap with libcrypto, rename them
11# - libc/gen/assert.c: __{diag,}assert13() -> __{diag,}assert() 11# - libc/gen/assert.c: __{diag,}assert13() -> __{diag,}assert()
12# - lib/libc/net/iso_addr.c: remove 12# - lib/libc/net/iso_addr.c: remove
13# - libc/gen/times.c: remove; __times13() -> times() 13# - libc/gen/times.c: remove; __times13() -> times()
14# - libc/gen/timezone.c: remove; __timezone13 -> timezone 14# - libc/gen/timezone.c: remove; __timezone13 -> timezone
@@ -34,14 +34,14 @@ @@ -34,14 +34,14 @@
34# - remove gets(); it is finally dead in c11. 34# - remove gets(); it is finally dead in c11.
35# (note: maybe it still needs to be kept in a compat lib; but not in libc) 35# (note: maybe it still needs to be kept in a compat lib; but not in libc)
36# - make __cerror (spelled CERROR) hidden again 36# - make __cerror (spelled CERROR) hidden again
37# - remove ruserok() and friends to libcompat (or entirely) 37# - remove ruserok() and friends to libcompat (or entirely)
38# - remove alloca fallback and expect compiler to provide a builtin version. 38# - remove alloca fallback and expect compiler to provide a builtin version.
39# - switch to DT_INIT_ARRAY on all platforms 39# - switch to DT_INIT_ARRAY on all platforms
40# - consolidate ownership with crt0.o and avoid common symbols 40# - consolidate ownership with crt0.o and avoid common symbols
41# - redo stdin/stdout/stderr to not require copy relocations 41# - redo stdin/stdout/stderr to not require copy relocations
42# - move gethostbyname to a compat library 42# - move gethostbyname to a compat library
43# - remove arc4random(3) API 43# - remove arc4random(3) API
44# - decide whether soft-float should support fenv.h, including thread-local contett 44# - decide whether soft-float should support fenv.h, including thread-local contett
45# - stop all math functions from setting errno 45# - stop all math functions from setting errno
46major=12 46major=12
47minor=200 47minor=201

cvs diff -r1.193 -r1.194 src/lib/libc/gen/Makefile.inc (expand / switch to unified diff)

--- src/lib/libc/gen/Makefile.inc 2016/01/14 20:41:23 1.193
+++ src/lib/libc/gen/Makefile.inc 2016/04/03 00:19:42 1.194
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.inc,v 1.193 2016/01/14 20:41:23 christos Exp $ 1# $NetBSD: Makefile.inc,v 1.194 2016/04/03 00:19:42 christos Exp $
2# from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 2# from: @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
3 3
4# gen sources 4# gen sources
5.PATH: ${ARCHDIR}/gen ${.CURDIR}/gen 5.PATH: ${ARCHDIR}/gen ${.CURDIR}/gen
6 6
7.if ${RUMPRUN} != "yes" 7.if ${RUMPRUN} != "yes"
8SRCS+= _errno.c daemon.c 8SRCS+= _errno.c daemon.c
9.endif 9.endif
10 10
11SRCS+= alarm.c alphasort.c arc4random.c assert.c asysctl.c \ 11SRCS+= alarm.c alphasort.c arc4random.c assert.c asysctl.c \
12 basename.c clock.c closedir.c closefrom.c \ 12 basename.c clock.c closedir.c closefrom.c \
13 confstr.c ctermid.c ctype_.c \ 13 confstr.c ctermid.c ctype_.c \
14 dehumanize_number.c devname.c dirname.c disklabel.c err.c errx.c \ 14 dehumanize_number.c devname.c dirname.c disklabel.c err.c errx.c \
@@ -25,28 +25,29 @@ SRCS+= alarm.c alphasort.c arc4random.c  @@ -25,28 +25,29 @@ SRCS+= alarm.c alphasort.c arc4random.c
25 nice.c nlist.c nlist_aout.c nlist_coff.c nlist_ecoff.c nlist_elf32.c \ 25 nice.c nlist.c nlist_aout.c nlist_coff.c nlist_ecoff.c nlist_elf32.c \
26 nlist_elf64.c opendir.c pause.c popen.c posix_spawn_sched.c \ 26 nlist_elf64.c opendir.c pause.c popen.c posix_spawn_sched.c \
27 posix_spawn_fileactions.c posix_spawnp.c psignal.c pthread_atfork.c \ 27 posix_spawn_fileactions.c posix_spawnp.c psignal.c pthread_atfork.c \
28 ptree.c pwcache.c pw_scan.c raise.c randomid.c rb.c readdir.c \ 28 ptree.c pwcache.c pw_scan.c raise.c randomid.c rb.c readdir.c \
29 rewinddir.c scandir.c seekdir.c setdomainname.c \ 29 rewinddir.c scandir.c seekdir.c setdomainname.c \
30 sethostname.c setjmperr.c setmode.c setproctitle.c setprogname.c \ 30 sethostname.c setjmperr.c setmode.c setproctitle.c setprogname.c \
31 shquote.c shquotev.c sighold.c sigignore.c siginterrupt.c \ 31 shquote.c shquotev.c sighold.c sigignore.c siginterrupt.c \
32 siglist.c signal.c signame.c sigrelse.c \ 32 siglist.c signal.c signame.c sigrelse.c \
33 sigset.c sigsetops.c sleep.c \ 33 sigset.c sigsetops.c sleep.c \
34 stringlist.c sysconf.c sysctl.c sysctlbyname.c sysctlgetmibinfo.c \ 34 stringlist.c sysconf.c sysctl.c sysctlbyname.c sysctlgetmibinfo.c \
35 sysctlnametomib.c syslog.c telldir.c time.c \ 35 sysctlnametomib.c syslog.c telldir.c time.c \
36 times.c toascii.c tolower_.c ttyname.c ttyslot.c toupper_.c ualarm.c \ 36 times.c toascii.c tolower_.c ttyname.c ttyslot.c toupper_.c ualarm.c \
37 ulimit.c uname.c unvis.c usleep.c utime.c utimens.c utmp.c \ 37 ulimit.c uname.c unvis.c usleep.c utime.c utimens.c utmp.c \
38 utmpx.c valloc.c vis.c wait.c wait3.c waitpid.c warn.c warnx.c \ 38 utmpx.c valloc.c vis.c wait.c wait3.c waitid.c waitpid.c warn.c \
39 warnc.c vwarn.c vwarnx.c vwarnc.c verr.c verrx.c verrc.c wordexp.c 39 warnx.c warnc.c vwarn.c vwarnx.c vwarnc.c verr.c verrx.c verrc.c \
 40 wordexp.c
40 41
41# uses alloca 42# uses alloca
42COPTS.execvp.c = -Wno-stack-protector 43COPTS.execvp.c = -Wno-stack-protector
43COPTS.execl.c = -Wno-stack-protector 44COPTS.execl.c = -Wno-stack-protector
44COPTS.execle.c = -Wno-stack-protector 45COPTS.execle.c = -Wno-stack-protector
45COPTS.execlp.c = -Wno-stack-protector 46COPTS.execlp.c = -Wno-stack-protector
46COPTS.syslog.c = -Wno-format-nonliteral 47COPTS.syslog.c = -Wno-format-nonliteral
47 48
48# machine-dependent gen sources 49# machine-dependent gen sources
49# m-d Makefile.inc must include sources for: 50# m-d Makefile.inc must include sources for:
50# _setjmp() bswap16() bswap32() bswap64() fabs() infinity 51# _setjmp() bswap16() bswap32() bswap64() fabs() infinity
51# isinf() setjmp() sigsetjmp() 52# isinf() setjmp() sigsetjmp()
52 53

File Added: src/lib/libc/gen/waitid.c
/*	$NetBSD: waitid.c,v 1.1 2016/04/03 00:19:42 christos Exp $	*/

/*-
 * Copyright (c) 2016 The NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
 * by Christos Zoulas.
 *
 * 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, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``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 FOUNDATION OR CONTRIBUTORS
 * 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>
__RCSID("$NetBSD: waitid.c,v 1.1 2016/04/03 00:19:42 christos Exp $");

#include "namespace.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/resource.h>

#include <string.h>
#include <signal.h>

#ifdef __weak_alias
__weak_alias(waitpid,_waitpid)
#endif

#ifdef __weak_alias
__weak_alias(waitid,_waitid)
#endif

int
waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags)
{
	int status;
	pid_t rv;

	rv = wait6(idtype, id, &status, flags, NULL, info);

	if (rv < 0)
		return rv;

	if (rv == 0 && info != NULL)
		memset(info, 0, sizeof(*info));

	return 0;
}

cvs diff -r1.179 -r1.180 src/lib/libc/include/namespace.h (expand / switch to unified diff)

--- src/lib/libc/include/namespace.h 2015/09/10 14:05:06 1.179
+++ src/lib/libc/include/namespace.h 2016/04/03 00:19:42 1.180
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: namespace.h,v 1.179 2015/09/10 14:05:06 christos Exp $ */ 1/* $NetBSD: namespace.h,v 1.180 2016/04/03 00:19:42 christos Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 4 * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -749,26 +749,27 @@ @@ -749,26 +749,27 @@
749#define vsprintf_l _vsprintf_l 749#define vsprintf_l _vsprintf_l
750#define vswprintf_l _vswprintf_l 750#define vswprintf_l _vswprintf_l
751#define vwprintf_l _vwprintf_l 751#define vwprintf_l _vwprintf_l
752#define vwscanf_l _vwscanf_l 752#define vwscanf_l _vwscanf_l
753#define vsyslog _vsyslog 753#define vsyslog _vsyslog
754#define vsyslog_r _vsyslog_r 754#define vsyslog_r _vsyslog_r
755#define vsyslog_ss _vsyslog_ss 755#define vsyslog_ss _vsyslog_ss
756#define vsyslogp _vsyslogp 756#define vsyslogp _vsyslogp
757#define vsyslogp_r _vsyslogp_r 757#define vsyslogp_r _vsyslogp_r
758#define vsyslogp_ss _vsyslogp_ss 758#define vsyslogp_ss _vsyslogp_ss
759#define wait _wait 759#define wait _wait
760#define wait3 _wait3 760#define wait3 _wait3
761#define wait4 _wait4 761#define wait4 _wait4
 762#define waitid _waitid
762#define waitpid _waitpid 763#define waitpid _waitpid
763#define wcscasecmp _wcscasecmp 764#define wcscasecmp _wcscasecmp
764#define wcscasecmp_l _wcscasecmp_l 765#define wcscasecmp_l _wcscasecmp_l
765#define wcsdup _wcsdup 766#define wcsdup _wcsdup
766#define wcsftime_l _wcsftime_l 767#define wcsftime_l _wcsftime_l
767#define wcsncasecmp _wcsncasecmp 768#define wcsncasecmp _wcsncasecmp
768#define wcsncasecmp_l _wcsncasecmp_l 769#define wcsncasecmp_l _wcsncasecmp_l
769#define wcstof _wcstof 770#define wcstof _wcstof
770#define wcstof_l _wcstof_l 771#define wcstof_l _wcstof_l
771#define wcstod _wcstod 772#define wcstod _wcstod
772#define wcstod_l _wcstod_l 773#define wcstod_l _wcstod_l
773#define wcstold _wcstold 774#define wcstold _wcstold
774#define wcstold_l _wcstold_l 775#define wcstold_l _wcstold_l

cvs diff -r1.228 -r1.229 src/lib/libc/sys/Makefile.inc (expand / switch to unified diff)

--- src/lib/libc/sys/Makefile.inc 2015/11/29 06:10:01 1.228
+++ src/lib/libc/sys/Makefile.inc 2016/04/03 00:19:42 1.229
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.inc,v 1.228 2015/11/29 06:10:01 pgoyette Exp $ 1# $NetBSD: Makefile.inc,v 1.229 2016/04/03 00:19:42 christos Exp $
2# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 2# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
3 3
4# sys sources 4# sys sources
5.PATH: ${ARCHDIR}/sys ${.CURDIR}/sys 5.PATH: ${ARCHDIR}/sys ${.CURDIR}/sys
6 6
7# other sources shared with the kernel, used in syscalls 7# other sources shared with the kernel, used in syscalls
8SRCS+= cpuset.c 8SRCS+= cpuset.c
9# glue to offer userland wrappers for some syscalls 9# glue to offer userland wrappers for some syscalls
10SRCS+= posix_fadvise.c posix_madvise.c sched.c sigqueue.c sigtimedwait.c \ 10SRCS+= posix_fadvise.c posix_madvise.c sched.c sigqueue.c sigtimedwait.c \
11 sigwait.c sigwaitinfo.c statvfs.c swapon.c semctl.c  11 sigwait.c sigwaitinfo.c statvfs.c swapon.c semctl.c
12 12
13.if ${RUMPRUN} != "yes" 13.if ${RUMPRUN} != "yes"
14# modules with non-default implementations on at least one architecture: 14# modules with non-default implementations on at least one architecture:
@@ -122,28 +122,28 @@ ASM= access.S acct.S \ @@ -122,28 +122,28 @@ ASM= access.S acct.S \
122 _lwp_unpark_all.S _lwp_suspend.S _lwp_continue.S \ 122 _lwp_unpark_all.S _lwp_suspend.S _lwp_continue.S \
123 _lwp_wakeup.S _lwp_detach.S _lwp_setprivate.S \ 123 _lwp_wakeup.S _lwp_detach.S _lwp_setprivate.S \
124 _lwp_setname.S _lwp_getname.S _lwp_ctl.S \ 124 _lwp_setname.S _lwp_getname.S _lwp_ctl.S \
125 madvise.S mincore.S minherit.S mkdir.S mkdirat.S mkfifo.S mkfifoat.S \ 125 madvise.S mincore.S minherit.S mkdir.S mkdirat.S mkfifo.S mkfifoat.S \
126 __mknod50.S mlock.S mlockall.S modctl.S __mount50.S \ 126 __mknod50.S mlock.S mlockall.S modctl.S __mount50.S \
127 mprotect.S __msgctl50.S msgget.S munlock.S munlockall.S \ 127 mprotect.S __msgctl50.S msgget.S munlock.S munlockall.S \
128 munmap.S \ 128 munmap.S \
129 nfssvc.S __ntp_gettime50.S \ 129 nfssvc.S __ntp_gettime50.S \
130 openat.S \ 130 openat.S \
131 paccept.S pathconf.S pipe2.S pmc_get_info.S pmc_control.S \ 131 paccept.S pathconf.S pipe2.S pmc_get_info.S pmc_control.S \
132 __posix_chown.S __posix_fchown.S __posix_lchown.S \ 132 __posix_chown.S __posix_fchown.S __posix_lchown.S \
133 __posix_rename.S profil.S \ 133 __posix_rename.S profil.S \
134 __quotactl.S \ 134 __quotactl.S \
135 rasctl.S readlinkat.S reboot.S recvfrom.S recvmmsg.S recvmsg.S rename.S \ 135 rasctl.S readlinkat.S reboot.S recvfrom.S recvmmsg.S recvmsg.S \
136 renameat.S revoke.S rmdir.S \ 136 rename.S renameat.S revoke.S rmdir.S \
137 semconfig.S semget.S semop.S \ 137 semconfig.S semget.S semop.S \
138 sendmmsg.S sendmsg.S sendto.S setegid.S seteuid.S \ 138 sendmmsg.S sendmsg.S sendto.S setegid.S seteuid.S \
139 setgid.S setgroups.S __setitimer50.S __setlogin.S setpgid.S \ 139 setgid.S setgroups.S __setitimer50.S __setlogin.S setpgid.S \
140 setpriority.S \ 140 setpriority.S \
141 setregid.S setreuid.S setrlimit.S setsid.S setsockopt.S \ 141 setregid.S setreuid.S setrlimit.S setsid.S setsockopt.S \
142 setuid.S __shmctl50.S shmdt.S shmget.S shutdown.S \ 142 setuid.S __shmctl50.S shmdt.S shmget.S shutdown.S \
143 sigqueueinfo.S \ 143 sigqueueinfo.S \
144 __sigaltstack14.S __sigpending14.S __sigaction_sigtramp.S \ 144 __sigaltstack14.S __sigpending14.S __sigaction_sigtramp.S \
145 ____sigtimedwait50.S __socket30.S socketpair.S __stat50.S \ 145 ____sigtimedwait50.S __socket30.S socketpair.S __stat50.S \
146 statvfs1.S swapctl.S symlink.S symlinkat.S __sysctl.S \ 146 statvfs1.S swapctl.S symlink.S symlinkat.S __sysctl.S \
147 timer_create.S timer_delete.S __timer_gettime50.S timer_getoverrun.S \ 147 timer_create.S timer_delete.S __timer_gettime50.S timer_getoverrun.S \
148 ____semctl50.S __timer_settime50.S \ 148 ____semctl50.S __timer_settime50.S \
149 umask.S undelete.S unlink.S unlinkat.S unmount.S __utimes50.S \ 149 umask.S undelete.S unlink.S unlinkat.S unmount.S __utimes50.S \
@@ -163,27 +163,27 @@ ASM_MD= _lwp_getprivate.S mremap.S  @@ -163,27 +163,27 @@ ASM_MD= _lwp_getprivate.S mremap.S
163 SRCS+= ${f} 163 SRCS+= ${f}
164. endif 164. endif
165.endfor 165.endfor
166 166
167WEAKASM= accept.S __aio_suspend50.S close.S connect.S execve.S \ 167WEAKASM= accept.S __aio_suspend50.S close.S connect.S execve.S \
168 fcntl.S fdatasync.S fsync.S \ 168 fcntl.S fdatasync.S fsync.S \
169 fsync_range.S __kevent50.S \ 169 fsync_range.S __kevent50.S \
170 kill.S mq_receive.S mq_send.S __mq_timedreceive50.S __mq_timedsend50.S \ 170 kill.S mq_receive.S mq_send.S __mq_timedreceive50.S __mq_timedsend50.S \
171 msgrcv.S msgsnd.S __msync13.S __nanosleep50.S open.S poll.S \ 171 msgrcv.S msgsnd.S __msync13.S __nanosleep50.S open.S poll.S \
172 __pollts50.S __pselect50.S read.S readlink.S \ 172 __pollts50.S __pselect50.S read.S readlink.S \
173 readv.S _sched_setparam.S _sched_getparam.S _sched_setaffinity.S \ 173 readv.S _sched_setparam.S _sched_getparam.S _sched_setaffinity.S \
174 _sched_getaffinity.S sched_yield.S \ 174 _sched_getaffinity.S sched_yield.S \
175 __select50.S setcontext.S __sigprocmask14.S __sigsuspend14.S sysarch.S \ 175 __select50.S setcontext.S __sigprocmask14.S __sigsuspend14.S sysarch.S \
176 __wait450.S write.S writev.S 176 __wait450.S wait6.S write.S writev.S
177 177
178NOERR= getegid.S geteuid.S getgid.S getpid.S getppid.S getuid.S \ 178NOERR= getegid.S geteuid.S getgid.S getpid.S getppid.S getuid.S \
179 issetugid.S posix_spawn.S sync.S __posix_fadvise50.S 179 issetugid.S posix_spawn.S sync.S __posix_fadvise50.S
180 180
181PSEUDONOERR= _exit.S 181PSEUDONOERR= _exit.S
182 182
183_GENFILES= ${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} \ 183_GENFILES= ${ASM} ${WEAKASM} ${NOERR} ${PSEUDONOERR} \
184 ${ASM_GLUE} ${ASM_GLUENOERR} 184 ${ASM_GLUE} ${ASM_GLUENOERR}
185 185
186SRCS+= ${_GENFILES} 186SRCS+= ${_GENFILES}
187CLEANFILES+= ${_GENFILES} 187CLEANFILES+= ${_GENFILES}
188 188
189ASMDEPS= ${.CURDIR}/sys/Makefile.inc ${ARCHDIR}/SYS.h \ 189ASMDEPS= ${.CURDIR}/sys/Makefile.inc ${ARCHDIR}/SYS.h \
@@ -363,17 +363,18 @@ MLINKS+=sigqueue.2 sigqueueinfo.2 @@ -363,17 +363,18 @@ MLINKS+=sigqueue.2 sigqueueinfo.2
363MLINKS+=sigtimedwait.2 sigwaitinfo.2 363MLINKS+=sigtimedwait.2 sigwaitinfo.2
364MLINKS+=sigtimedwait.2 sigwait.2 364MLINKS+=sigtimedwait.2 sigwait.2
365MLINKS+=stat.2 fstat.2 stat.2 lstat.2 365MLINKS+=stat.2 fstat.2 stat.2 lstat.2
366MLINKS+=statvfs.2 fstatvfs.2 366MLINKS+=statvfs.2 fstatvfs.2
367MLINKS+=statvfs.2 statvfs1.2 367MLINKS+=statvfs.2 statvfs1.2
368MLINKS+=statvfs.2 fstatvfs1.2 368MLINKS+=statvfs.2 fstatvfs1.2
369MLINKS+=syscall.2 __syscall.2 369MLINKS+=syscall.2 __syscall.2
370MLINKS+=truncate.2 ftruncate.2 370MLINKS+=truncate.2 ftruncate.2
371MLINKS+=unlink.2 unlinkat.2 371MLINKS+=unlink.2 unlinkat.2
372MLINKS+=utimes.2 futimes.2 utimes.2 lutimes.2 372MLINKS+=utimes.2 futimes.2 utimes.2 lutimes.2
373MLINKS+=utimes.2 utimens.2 utimes.2 futimens.2 utimes.2 lutimens.2 373MLINKS+=utimes.2 utimens.2 utimes.2 futimens.2 utimes.2 lutimens.2
374MLINKS+=utimes.2 utimensat.2 374MLINKS+=utimes.2 utimensat.2
375MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2 375MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2
 376MLINKS+=wait.2 wait6.2 wait.2 waitid.2
376MLINKS+=write.2 writev.2 write.2 pwrite.2 write.2 pwritev.2 377MLINKS+=write.2 writev.2 write.2 pwrite.2 write.2 pwritev.2
377MLINKS+=pipe.2 pipe2.2 378MLINKS+=pipe.2 pipe2.2
378MLINKS+=accept.2 paccept.2 379MLINKS+=accept.2 paccept.2
379MLINKS+=nanosleep.2 clock_nanosleep.2 380MLINKS+=nanosleep.2 clock_nanosleep.2

cvs diff -r1.27 -r1.28 src/lib/libc/sys/wait.2 (expand / switch to unified diff)

--- src/lib/libc/sys/wait.2 2010/04/03 15:43:46 1.27
+++ src/lib/libc/sys/wait.2 2016/04/03 00:19:42 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: wait.2,v 1.27 2010/04/03 15:43:46 jruoho Exp $ 1.\" $NetBSD: wait.2,v 1.28 2016/04/03 00:19:42 christos Exp $
2.\" 2.\"
3.\" Copyright (c) 1980, 1991, 1993, 1994 3.\" Copyright (c) 1980, 1991, 1993, 1994
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors 14.\" 3. Neither the name of the University nor the names of its contributors
@@ -19,71 +19,81 @@ @@ -19,71 +19,81 @@
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.\" @(#)wait.2 8.2 (Berkeley) 4/19/94 30.\" @(#)wait.2 8.2 (Berkeley) 4/19/94
31.\" 31.\"
32.Dd April 3, 2010 32.Dd April 2, 2016
33.Dt WAIT 2 33.Dt WAIT 2
34.Os 34.Os
35.Sh NAME 35.Sh NAME
36.Nm wait , 36.Nm wait ,
 37.Nm waitid ,
37.Nm waitpid , 38.Nm waitpid ,
 39.Nm wait6 ,
38.Nm wait4 , 40.Nm wait4 ,
39.Nm wait3 41.Nm wait3
40.Nd wait for process termination 42.Nd wait for process termination
41.Sh LIBRARY 43.Sh LIBRARY
42.Lb libc 44.Lb libc
43.Sh SYNOPSIS 45.Sh SYNOPSIS
44.In sys/wait.h 46.In sys/wait.h
45.Ft pid_t 47.Ft pid_t
46.Fn wait "int *status" 48.Fn wait "int *status"
47.Ft pid_t 49.Ft pid_t
48.Fn waitpid "pid_t wpid" "int *status" "int options" 50.Fn waitpid "pid_t wpid" "int *status" "int options"
 51.Ft int
 52.Fn waitid "idtype_t idtype" "id_t id" "siginfo_t *info" "int options"
49.In sys/resource.h 53.In sys/resource.h
50.Ft pid_t 54.Ft pid_t
51.Fn wait3 "int *status" "int options" "struct rusage *rusage" 55.Fn wait3 "int *status" "int options" "struct rusage *rusage"
52.Ft pid_t 56.Ft pid_t
53.Fn wait4 "pid_t wpid" "int *status" "int options" "struct rusage *rusage" 57.Fn wait4 "pid_t wpid" "int *status" "int options" "struct rusage *rusage"
 58.Ft pid_t
 59.Fn wait6 "idtype_t idtype" "id_t id" "int *status" "int options" "struct __wrusage *wrusage" "siginfo_t *infop"
54.Sh DESCRIPTION 60.Sh DESCRIPTION
55The 61The
56.Fn wait 62.Fn wait
57function suspends execution of its calling process until 63function suspends execution of its calling process until
58.Fa status 64.Fa status
59information is available for a terminated child process, 65information is available for a terminated child process,
60or a signal is received. 66or a signal is received.
61On return from a successful 67On return from a successful
62.Fn wait 68.Fn wait
63call, 69call,
64the 70the
65.Fa status 71.Fa status
66area contains termination information about the process that exited 72area contains termination information about the process that exited
67as defined below. 73as defined below.
68.Pp 74.Pp
69The 75The
70.Fn wait4 76.Fn wait4
 77and
 78.Fn wait6
71call provides a more general interface for programs 79call provides a more general interface for programs
72that need to wait for certain child processes, 80that need to wait for certain child processes,
73that need resource utilization statistics accumulated by child processes, 81that need resource utilization statistics accumulated by child processes,
74or that require options. 82or that require options.
75The other wait functions are implemented using 83The other wait functions are implemented using
76.Fn wait4 . 84.Fn wait4 .
 85or
 86.Fn wait6 .
77.Pp 87.Pp
78The 88The
79.Fa wpid 89.Fa wpid
80parameter specifies the set of child processes for which to wait. 90parameter specifies the set of child processes for which to wait.
81If 91If
82.Fa wpid 92.Fa wpid
83is \-1, the call waits for any child process. 93is \-1, the call waits for any child process.
84If 94If
85.Fa wpid 95.Fa wpid
86is 0, 96is 0,
87the call waits for any child process in the process group of the caller. 97the call waits for any child process in the process group of the caller.
88If 98If
89.Fa wpid 99.Fa wpid
@@ -137,26 +147,325 @@ This is an alias for @@ -137,26 +147,325 @@ This is an alias for
137.Dv WALLSIG . 147.Dv WALLSIG .
138It is provided for compatibility with the Linux 148It is provided for compatibility with the Linux
139.Xr clone 2 149.Xr clone 2
140API . 150API .
141.El 151.El
142.Pp 152.Pp
143If 153If
144.Fa rusage 154.Fa rusage
145is non-zero, a summary of the resources used by the terminated 155is non-zero, a summary of the resources used by the terminated
146process and all its 156process and all its
147children is returned (this information is currently not available 157children is returned (this information is currently not available
148for stopped processes). 158for stopped processes).
149.Pp 159.Pp
 160The
 161.Fn wait6
 162function is the most general function in this family and its distinct
 163features are:
 164.Pp
 165All of the desired process statuses to be waited on must be explicitly
 166specified in
 167.Fa options .
 168The
 169.Fn wait ,
 170.Fn waitpid ,
 171.Fn wait3 ,
 172and
 173.Fn wait4
 174functions all implicitly wait for exited and trapped processes,
 175but the
 176.Fn waitid
 177and
 178.Fn wait6
 179functions require the corresponding
 180.Dv WEXITED
 181and
 182.Dv WTRAPPED
 183flags to be explicitly specified.
 184This allows waiting for processes which have experienced other
 185status changes without having to also handle the exit status from
 186terminated processes.
 187.Pp
 188The
 189.Fn wait6
 190function accepts a
 191.Fa wrusage
 192argument which points to a structure defined as:
 193.Bd -literal
 194struct wrusage {
 195 struct rusage wru_self;
 196 struct rusage wru_children;
 197};
 198.Ed
 199.Pp
 200This allows the calling process to collect resource usage statistics
 201from both its own child process as well as from its grand children.
 202When no resource usage statistics are needed this pointer can be
 203.Dv NULL .
 204.Pp
 205The last argument
 206.Fa infop
 207must be either
 208.Dv NULL
 209or a pointer to a
 210.Fa siginfo_t
 211structure.
 212If
 213.Pf non- Dv NULL ,
 214the structure is filled with the same data as for a
 215.Dv SIGCHLD
 216signal delivered when the process changed state.
 217.Pp
 218The set of child processes to be queried is specified by the arguments
 219.Fa idtype
 220and
 221.Fa id .
 222The separate
 223.Fa idtype
 224and
 225.Fa id
 226arguments support many other types of
 227identifers in addition to process IDs and process group IDs.
 228.Bl -bullet -offset indent
 229.It
 230If
 231.Fa idtype
 232is
 233.Dv P_PID ,
 234.Fn waitid
 235and
 236.Fn wait6
 237wait for the child process with a process ID equal to
 238.Dv (pid_t)id .
 239.It
 240If
 241.Fa idtype
 242is
 243.Dv P_PGID ,
 244.Fn waitid
 245and
 246.Fn wait6
 247wait for the child process with a process group ID equal to
 248.Dv (pid_t)id .
 249.It
 250If
 251.Fa idtype
 252is
 253.Dv P_ALL ,
 254.Fn waitid
 255and
 256.Fn wait6
 257wait for any child process and the
 258.Dv id
 259is ignored.
 260.It
 261If
 262.Fa idtype
 263is
 264.Dv P_PID
 265or
 266.Dv P_PGID
 267and the
 268.Dv id
 269is zero,
 270.Fn waitid
 271and
 272.Fn wait6
 273wait for any child process in the same process group as the caller.
 274.El
 275.Pp
 276Non-standard identifier types supported by this
 277implementation of
 278.Fn waitid
 279and
 280.Fn wait6
 281are:
 282.Bl -tag -width P_JAILID
 283.It Dv P_UID
 284Wait for processes whose effective user ID is equal to
 285.Dv (uid_t) Fa id .
 286.It Dv P_GID
 287Wait for processes whose effective group ID is equal to
 288.Dv (gid_t) Fa id .
 289.It Dv P_SID
 290Wait for processes whose session ID is equal to
 291.Fa id .
 292.\" This is just how sessions work, not sure this needs to be documented here
 293If the child process started its own session,
 294its session ID will be the same as its process ID.
 295Otherwise the session ID of a child process will match the caller's session ID.
 296.\" .It Dv P_JAILID
 297.\" Waits for processes within a jail whose jail identifier is equal to
 298.\" .Fa id .
 299.El
 300.Pp
 301For the
 302.Fn waitpid
 303and
 304.Fn wait4
 305functions, the single
 306.Fa wpid
 307argument specifies the set of child processes for which to wait.
 308.Bl -bullet -offset indent
 309.It
 310If
 311.Fa wpid
 312is -1, the call waits for any child process.
 313.It
 314If
 315.Fa wpid
 316is 0,
 317the call waits for any child process in the process group of the caller.
 318.It
 319If
 320.Fa wpid
 321is greater than zero, the call waits for the process with process ID
 322.Fa wpid .
 323.It
 324If
 325.Fa wpid
 326is less than -1, the call waits for any process whose process group ID
 327equals the absolute value of
 328.Fa wpid .
 329.El
 330.Pp
 331The
 332.Fa status
 333argument is defined below.
 334.Pp
 335The
 336.Fa options
 337argument contains the bitwise OR of any of the following options.
 338.Bl -tag -width WCONTINUED
 339.It Dv WCONTINUED
 340Report the status of selected processes that
 341have continued from a job control stop by receiving a
 342.Dv SIGCONT
 343signal.
 344.It Dv WNOHANG
 345Do not block when
 346there are no processes wishing to report status.
 347.It Dv WUNTRACED
 348Report the status of selected processes which are stopped due to a
 349.Dv SIGTTIN , SIGTTOU , SIGTSTP ,
 350or
 351.Dv SIGSTOP
 352signal.
 353.It Dv WSTOPPED
 354An alias for
 355.Dv WUNTRACED .
 356.It Dv WTRAPPED
 357Report the status of selected processes which are being traced via
 358.Xr ptrace 2
 359and have trapped or reached a breakpoint.
 360This flag is implicitly set for the functions
 361.Fn wait ,
 362.Fn waitpid ,
 363.Fn wait3 ,
 364and
 365.Fn wait4 .
 366.br
 367For the
 368.Fn waitid
 369and
 370.Fn wait6
 371functions, the flag has to be explicitly included in
 372.Fa options
 373if status reports from trapped processes are expected.
 374.It Dv WEXITED
 375Report the status of selected processes which have terminated.
 376This flag is implicitly set for the functions
 377.Fn wait ,
 378.Fn waitpid ,
 379.Fn wait3 ,
 380and
 381.Fn wait4 .
 382.br
 383For the
 384.Fn waitid
 385and
 386.Fn wait6
 387functions, the flag has to be explicitly included in
 388.Fa options
 389if status reports from terminated processes are expected.
 390.It Dv WNOWAIT
 391Keep the process whose status is returned in a waitable state.
 392The process may be waited for again after this call completes.
 393.El
 394.sp
 395For the
 396.Fn waitid
 397and
 398.Fn wait6
 399functions, at least one of the options
 400.Dv WEXITED ,
 401.Dv WUNTRACED ,
 402.Dv WSTOPPED ,
 403.Dv WTRAPPED ,
 404or
 405.Dv WCONTINUED
 406must be specified.
 407Otherwise there will be no events for the call to report.
 408To avoid hanging indefinitely in such a case these functions
 409return -1 with
 410.Dv errno
 411set to
 412.Dv EINVAL .
 413.Pp
 414If
 415.Fa rusage
 416is non-NULL, a summary of the resources used by the terminated
 417process and all its children is returned.
 418.Pp
 419If
 420.Fa wrusage
 421is non-NULL, separate summaries are returned for the resources used
 422by the terminated process and the resources used by all its children.
 423.Pp
 424If
 425.Fa infop
 426is non-NULL, a
 427.Dv siginfo_t
 428structure is returned with the
 429.Fa si_signo
 430field set to
 431.Dv SIGCHLD
 432and the
 433.Fa si_pid
 434field set to the process ID of the process reporting status.
 435For the exited process, the
 436.Fa si_status
 437field of the
 438.Dv siginfo_t
 439structure contains the full 32 bit exit status passed to
 440.Xr _exit 2 ;
 441the
 442.Fa status
 443argument of other calls only returns 8 lowest bits of the exit status.
 444.Pp
 445When the
 446.Dv WNOHANG
 447option is specified and no processes
 448wish to report status,
 449.Fn waitid
 450sets the
 451.Fa si_signo
 452and
 453.Fa si_pid
 454fields in
 455.Fa infop
 456to zero.
 457Checking these fields is the only way to know if a status change was reported.
 458.Pp
150When the 459When the
151.Dv WNOHANG 460.Dv WNOHANG
152option is specified and no processes 461option is specified and no processes
153wish to report status, 462wish to report status,
154.Fn wait4 463.Fn wait4
155returns a 464returns a
156process id 465process id
157of 0. 466of 0.
158.Pp 467.Pp
159The 468The
160.Fn waitpid 469.Fn waitpid
161call is identical to 470call is identical to
162.Fn wait4 471.Fn wait4
@@ -245,88 +554,127 @@ see @@ -245,88 +554,127 @@ see
245.Xr intro 2 , 554.Xr intro 2 ,
246System call restart. 555System call restart.
247.Sh RETURN VALUES 556.Sh RETURN VALUES
248If 557If
249.Fn wait 558.Fn wait
250returns due to a stopped 559returns due to a stopped
251or terminated child process, the process ID of the child 560or terminated child process, the process ID of the child
252is returned to the calling process. 561is returned to the calling process.
253Otherwise, a value of \-1 is returned and 562Otherwise, a value of \-1 is returned and
254.Va errno 563.Va errno
255is set to indicate the error. 564is set to indicate the error.
256.Pp 565.Pp
257If 566If
 567.Fn wait6 ,
258.Fn wait4 , 568.Fn wait4 ,
259.Fn wait3 569.Fn wait3
260or 570or
261.Fn waitpid 571.Fn waitpid
262returns due to a stopped 572returns due to a stopped
263or terminated child process, the process ID of the child 573or terminated child process, the process ID of the child
264is returned to the calling process. 574is returned to the calling process.
265If there are no children not previously awaited, 575If there are no children not previously awaited,
266\-1 is returned with 576\-1 is returned with
267.Va errno 577.Va errno
268set to 578set to
269.Bq Er ECHILD . 579.Bq Er ECHILD .
270Otherwise, if 580Otherwise, if
271.Dv WNOHANG 581.Dv WNOHANG
272is specified and there are 582is specified and there are
273no stopped or exited children, 0 is returned. 583no stopped or exited children, 0 is returned.
274If an error is detected or a caught signal aborts the call, 584If an error is detected or a caught signal aborts the call,
275a value of \-1 is returned and 585a value of \-1 is returned and
276.Va errno 586.Va errno
277is set to indicate the error. 587is set to indicate the error.
 588.Pp
 589If
 590.Fn waitid
 591returns because one or more processes have a state change to report,
 5920 is returned.
 593If an error is detected,
 594a value of -1
 595is returned and
 596.Va errno
 597is set to indicate the error.
 598If
 599.Dv WNOHANG
 600is specified and there are
 601no stopped, continued or exited children,
 6020 is returned.
 603The
 604.Fa si_signo
 605and
 606.Fa si_pid
 607fields of
 608.Fa infop
 609must be checked against zero to determine if a process reported status.
278.Sh ERRORS 610.Sh ERRORS
279.Fn wait 611.Fn wait
280will fail and return immediately if: 612will fail and return immediately if:
281.Bl -tag -width Er 613.Bl -tag -width Er
282.It Bq Er ECHILD 614.It Bq Er ECHILD
283The calling process has no existing unwaited-for child processes. 615The calling process has no existing unwaited-for child processes.
 616.It Bq Er ECHILD
 617No status from the terminated child process is available
 618because the calling process has asked the system to discard
 619such status by ignoring the signal
 620.Dv SIGCHLD
 621or setting the flag
 622.Dv SA_NOCLDWAIT
 623for that signal.
284.It Bq Er EFAULT 624.It Bq Er EFAULT
285The 625The
286.Fa status 626.Fa status
287or 627or
288.Fa rusage 628.Fa rusage
289arguments point to an illegal address. 629arguments point to an illegal address.
290(May not be detected before exit of a child process.) 630(May not be detected before exit of a child process.)
291.It Bq Er EINTR 631.It Bq Er EINTR
292The call was interrupted by a caught signal, 632The call was interrupted by a caught signal,
293or the signal did not have the 633or the signal did not have the
294.Dv SA_RESTART 634.Dv SA_RESTART
295flag set. 635flag set.
296.El 636.El
297.Pp 637.Pp
298In addition, 638In addition,
 639.Fn wait6 ,
299.Fn wait3 , 640.Fn wait3 ,
300.Fn wait4 , 641.Fn wait4 ,
 642.Fn waitid ,
301and 643and
302.Fn waitpid 644.Fn waitpid
303will fail and return immediately if: 645will fail and return immediately if:
304.Bl -tag -width Er 646.Bl -tag -width Er
305.It Bq Er EINVAL 647.It Bq Er EINVAL
306An invalid value was specified for 648An invalid value was specified for
307.Fa options . 649.Fa options .
308.El 650.El
309.Sh SEE ALSO 651.Sh SEE ALSO
310.Xr _exit 2 , 652.Xr _exit 2 ,
311.Xr sigaction 2 653.Xr ptrace 2 ,
 654.Xr sigaction 2 ,
 655.Xr siginfo 2
312.Sh STANDARDS 656.Sh STANDARDS
313The 657The
314.Fn wait 658.Fn wait
315and 659and
316.Fn waitpid 660.Fn waitpid
317functions conform to 661functions conform to
318.St -p1003.1-90 ; 662.St -p1003.1-90 ;
319the 663the
 664.Fn waitid
 665function conforms to
 666.St -p1003.1-2004 ;
 667the
320.Fn wait3 668.Fn wait3
321function conforms to 669function conforms to
322.St -xpg4 ; 670.St -xpg4 ;
323.Fn wait4 671.Fn wait4
324is an extension. 672is an extension.
325The 673The
326.Fn WCOREDUMP 674.Fn WCOREDUMP
327macro 675macro
328and the ability to restart a pending 676and the ability to restart a pending
329.Fn wait 677.Fn wait
330call are extensions to the POSIX interface. 678call are extensions to the POSIX interface.
331.Sh HISTORY 679.Sh HISTORY
332A 680A