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:
Robert Drehmel 2002-11-26 17:30:55 +00:00
parent db2661ce96
commit d1989db545
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107274

View File

@ -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 */