Module Name:    src
Committed By:   abhinav
Date:           Thu Jun 30 17:00:55 UTC 2016

Modified Files:
        src/lib/libc/sys: wait.2

Log Message:
Document WAIT_ANY and WAIT_MYPGRP constants
(text referenced from OpenBSD wait(2) man page)

While there, remove duplicated information and add more refernces in SEE ALSO
Also, the NOTES section refers to intro(2), while siginterrupt(3) is a better
suited reference, so fix that too.

Ok by wiz


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/lib/libc/sys/wait.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/wait.2
diff -u src/lib/libc/sys/wait.2:1.35 src/lib/libc/sys/wait.2:1.36
--- src/lib/libc/sys/wait.2:1.35	Fri Apr 29 13:17:09 2016
+++ src/lib/libc/sys/wait.2	Thu Jun 30 17:00:55 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wait.2,v 1.35 2016/04/29 13:17:09 christos Exp $
+.\"	$NetBSD: wait.2,v 1.36 2016/06/30 17:00:55 abhinav Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)wait.2	8.2 (Berkeley) 4/19/94
 .\"
-.Dd April 28, 2016
+.Dd June 27, 2016
 .Dt WAIT 2
 .Os
 .Sh NAME
@@ -86,37 +86,6 @@ or
 .Fn wait6 .
 .Pp
 The
-.Fa wpid
-parameter specifies the set of child processes for which to wait.
-If
-.Fa wpid
-is \-1, the call waits for any child process.
-If
-.Fa wpid
-is 0,
-the call waits for any child process in the process group of the caller.
-If
-.Fa wpid
-is greater than zero, the call waits for the process with process id
-.Fa wpid .
-If
-.Fa wpid
-is less than \-1, the call waits for any process whose process group id
-equals the absolute value of
-.Fa wpid .
-.Pp
-The
-.Fa status
-parameter is defined below.
-.Pp
-If
-.Fa rusage
-is non-zero, a summary of the resources used by the terminated
-process and all its
-children is returned (this information is currently not available
-for stopped processes).
-.Pp
-The
 .Fn wait6
 function is the most general function in this family and its distinct
 features are:
@@ -264,15 +233,24 @@ and
 functions, the single
 .Fa wpid
 argument specifies the set of child processes for which to wait.
+The following symbolic constants are defined in
+.In sys/wait.h
+.Bd -literal -offset indent
+#define WAIT_ANY        (-1)    /* any process */
+#define WAIT_MYPGRP     0       /* any process in my process group */
+.Ed
 .Bl -bullet -offset indent
 .It
 If
 .Fa wpid
-is \-1, the call waits for any child process.
+is
+.Dv WAIT_ANY ,
+the call waits for any child process.
 .It
 If
 .Fa wpid
-is 0,
+is
+.Dv WAIT_MYPGRP ,
 the call waits for any child process in the process group of the caller.
 .It
 If
@@ -306,7 +284,7 @@ when they exit.
 If
 .Dv WALTSIG
 is not specified, the call will wait only for processes that
-are configured to post 
+are configured to post
 .Dv SIGCHLD .
 .It Dv WCONTINUED
 Report the status of selected processes that
@@ -549,8 +527,7 @@ the call may be interrupted or restarted
 returns,
 depending on the options in effect for the signal;
 see
-.Xr intro 2 ,
-System call restart.
+.Xr siginterrupt 3 .
 .Sh RETURN VALUES
 If
 .Fn wait
@@ -649,7 +626,9 @@ An invalid value was specified for
 .Xr _exit 2 ,
 .Xr ptrace 2 ,
 .Xr sigaction 2 ,
-.Xr siginfo 2
+.Xr siginfo 2 ,
+.Xr exit 3 ,
+.Xr siginterrupt 3
 .Sh STANDARDS
 The
 .Fn wait

Reply via email to