diff options
author | robert <robert@FreeBSD.org> | 2002-11-26 17:30:55 +0000 |
---|---|---|
committer | robert <robert@FreeBSD.org> | 2002-11-26 17:30:55 +0000 |
commit | 0566f48a05ab6f7a408dcb61008c3469a84d2528 (patch) | |
tree | 87a166ac96476dd3bd6de9618715cf9aef17c8d8 /sys/kern | |
parent | c6f89c65610db7ae3ac78af2522c7527cf753c9b (diff) | |
download | FreeBSD-src-0566f48a05ab6f7a408dcb61008c3469a84d2528.zip FreeBSD-src-0566f48a05ab6f7a408dcb61008c3469a84d2528.tar.gz |
To avoid sleeping with all sorts of resources acquired (the reported
problem was a locked directory vnode), do not give the process a chance
to sleep in state "stopevent" (depends on the S_EXEC bit being set in
p_stops) until most resources have been released again.
Approved by: re
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exec.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 8f64cf4..8e2d03b 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -567,8 +567,6 @@ interpret: * If tracing the process, trap to debugger so breakpoints * can be set before the program executes. */ - _STOPEVENT(p, S_EXEC, 0); - if (p->p_flag & P_TRACED) psignal(p, SIGTRAP); @@ -640,8 +638,14 @@ exec_fail_dealloc: if (imgp->object) vm_object_deallocate(imgp->object); - if (error == 0) + if (error == 0) { + /* + * Stop the process here if its stop event mask has + * the S_EXEC bit set. + */ + STOPEVENT(p, S_EXEC, 0); goto done2; + } exec_fail: /* we're done here, clear P_INEXEC */ |