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
This commit is contained in:
parent
db2661ce96
commit
d1989db545
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107274
@ -567,8 +567,6 @@ kern_execve(td, fname, argv, envv, mac_p)
|
||||
* 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 @@ kern_execve(td, fname, argv, envv, mac_p)
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user