aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-04-09 20:00:40 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-04-09 20:00:40 +0000
commit6dc958b9ff645879cd50e3facf0b59410a3ac133 (patch)
treed1e88782968c34c55510775749f2586c9ecc19f7 /sys/kern/kern_exit.c
parent16e7bc7b9026dde47b3d37bd4e15e7fcb7a28cfe (diff)
downloadsrc-6dc958b9ff645879cd50e3facf0b59410a3ac133.tar.gz
src-6dc958b9ff645879cd50e3facf0b59410a3ac133.zip
Notes
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 7b409b49c16b..db899b23f435 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);