summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-08-03 19:25:50 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-08-03 19:25:50 +0000
commitd6064748efda9fa574e236e280d3afb43e41e655 (patch)
tree3264babbb4b73e7810883891e8348f02d4520704 /lib/libc
parent998728a553fddc93a573c38d39ab8d5bfd45d762 (diff)
Implement the WCONTINUED flag to the wait(2) family of syscalls and the
associated WIFCONTINUED macro as per 1003.1-2001. Adapted from FreeBSD. A minor amount of trickiness is involved here. The value for WCONTINUED is chosen in such a way that _WSTATUS(_WCONTINUED) == _WSTOPPED and the WIFSTOPPED macro has been modified such that WIFSTOPPED(_WCONTINUED) != _WSTOPPED. This means we don't need to add an extra check to the WIFSIGNALED and WIFSTOPPED macros. deraadt@ OK.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/wait.229
1 files changed, 20 insertions, 9 deletions
diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2
index c29be5dfd3d..a0575b0c4cd 100644
--- a/lib/libc/sys/wait.2
+++ b/lib/libc/sys/wait.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: wait.2,v 1.15 2003/06/02 20:18:39 millert Exp $
+.\" $OpenBSD: wait.2,v 1.16 2003/08/03 19:25:49 millert Exp $
.\" $NetBSD: wait.2,v 1.6 1995/02/27 12:39:37 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
@@ -102,18 +102,23 @@ The
.Fa options
parameter contains the bitwise
.Tn OR
-of any of the following options.
-The
-.Dv WNOHANG
-option is used to indicate that the call should not block if
-there are no processes that wish to report status.
-If the
-.Dv WUNTRACED
-option is set, children of the current process that are stopped due to a
+of any of the following options:
+.Bl -tag -width Ds
+.It Dv WCONTINUED
+Causes status to be reported for stopped child processes that have been
+continued by receipt of a
+.Dv SIGCONT
+signal.
+.It Dv WNOHANG
+Indicates that the call should not block if there are no processes that wish
+to report status.
+.It Dv WUNTRACED
+If set, children of the current process that are stopped due to a
.Dv SIGTTIN , SIGTTOU , SIGTSTP ,
or
.Dv SIGSTOP
signal also have their status reported.
+.El
.Pp
If
.Fa rusage
@@ -146,6 +151,12 @@ value of \-1.
The following macros may be used to test the manner of exit of the process.
One of the first three macros will evaluate to a non-zero (true) value:
.Bl -tag -width Ds
+.It Fn WIFCONTINUED status
+True if the process has not terminated, and has continued after a job
+control stop.
+This macro can be true only if the wait call specified the
+.Dv WCONTINUED
+option).
.It Fn WIFEXITED status
True if the process terminated normally by a call to
.Xr _exit 2