diff options
Diffstat (limited to 'sys/kern/kern_exit.c')
| -rw-r--r-- | sys/kern/kern_exit.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index cc8470af1c5..e7c9f385b24 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.46 2003/07/21 22:44:50 tedu Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.47 2003/08/03 19:25:49 millert Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -397,7 +397,7 @@ sys_wait4(q, v, retval) if (SCARG(uap, pid) == 0) SCARG(uap, pid) = -q->p_pgid; - if (SCARG(uap, options) &~ (WUNTRACED|WNOHANG|WALTSIG)) + if (SCARG(uap, options) &~ (WUNTRACED|WNOHANG|WALTSIG|WCONTINUED)) return (EINVAL); loop: @@ -468,6 +468,18 @@ loop: error = 0; return (error); } + if ((SCARG(uap, options) & WCONTINUED) && (p->p_flag & P_CONTINUED)) { + p->p_flag &= ~P_CONTINUED; + retval[0] = p->p_pid; + + if (SCARG(uap, status)) { + status = _WCONTINUED; + error = copyout(&status, SCARG(uap, status), + sizeof(status)); + } else + error = 0; + return (error); + } } if (nfound == 0) return (ECHILD); |
