summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 3e359bb..d44209a 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -505,7 +505,7 @@ wait1(td, uap, compat)
uap->pid = -q->p_pgid;
PROC_UNLOCK(q);
}
- if (uap->options &~ (WUNTRACED|WNOHANG|WLINUXCLONE))
+ if (uap->options &~ (WUNTRACED|WNOHANG|WCONTINUED|WLINUXCLONE))
return (EINVAL);
mtx_lock(&Giant);
loop:
@@ -688,6 +688,22 @@ loop:
mtx_unlock(&Giant);
return (error);
}
+ if (uap->options & WCONTINUED && (p->p_flag & P_CONTINUED)) {
+ sx_xunlock(&proctree_lock);
+ td->td_retval[0] = p->p_pid;
+ p->p_flag &= ~P_CONTINUED;
+ PROC_UNLOCK(p);
+
+ if (uap->status) {
+ status = SIGCONT;
+ error = copyout((caddr_t)&status,
+ (caddr_t)uap->status, sizeof(status));
+ } else
+ error = 0;
+
+ mtx_unlock(&Giant);
+ return (error);
+ }
PROC_UNLOCK(p);
}
if (nfound == 0) {
OpenPOWER on IntegriCloud