Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/sys Document WAIT_ANY and WAIT_MYPGRP constants



details:   https://anonhg.NetBSD.org/src/rev/ec85e5fde1eb
branches:  trunk
changeset: 346190:ec85e5fde1eb
user:      abhinav <abhinav%NetBSD.org@localhost>
date:      Thu Jun 30 17:00:55 2016 +0000

description:
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

diffstat:

 lib/libc/sys/wait.2 |  57 ++++++++++++++++------------------------------------
 1 files changed, 18 insertions(+), 39 deletions(-)

diffs (113 lines):

diff -r db7da9a9b589 -r ec85e5fde1eb lib/libc/sys/wait.2
--- a/lib/libc/sys/wait.2       Thu Jun 30 16:34:56 2016 +0000
+++ b/lib/libc/sys/wait.2       Thu Jun 30 17:00:55 2016 +0000
@@ -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 @@
 .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 @@
 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 @@
 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 @@
 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 @@
 .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



Home | Main Index | Thread Index | Old Index