diff options
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 7b409b4..db899b2 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -506,17 +506,15 @@ wait1(td, uap, compat) struct pargs *pa; int status, error; - mtx_lock(&Giant); q = td->td_proc; if (uap->pid == 0) { PROC_LOCK(q); uap->pid = -q->p_pgid; PROC_UNLOCK(q); } - if (uap->options &~ (WUNTRACED|WNOHANG|WLINUXCLONE)) { - error = EINVAL; - goto done2; - } + if (uap->options &~ (WUNTRACED|WNOHANG|WLINUXCLONE)) + return (EINVAL); + mtx_lock(&Giant); loop: nfound = 0; sx_slock(&proctree_lock); |