mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
proc: shave a lock trip on exit if possible
... which happens to be vast majority of the time
This commit is contained in:
parent
7c31de1a3c
commit
80cf427b8d
1 changed files with 5 additions and 3 deletions
|
|
@ -477,9 +477,11 @@ exit1(struct thread *td, int rval, int signo)
|
|||
sx_xunlock(&allproc_lock);
|
||||
|
||||
sx_xlock(&proctree_lock);
|
||||
PROC_LOCK(p);
|
||||
p->p_flag &= ~(P_TRACED | P_PPWAIT | P_PPTRACE);
|
||||
PROC_UNLOCK(p);
|
||||
if ((p->p_flag & (P_TRACED | P_PPWAIT | P_PPTRACE)) != 0) {
|
||||
PROC_LOCK(p);
|
||||
p->p_flag &= ~(P_TRACED | P_PPWAIT | P_PPTRACE);
|
||||
PROC_UNLOCK(p);
|
||||
}
|
||||
|
||||
/*
|
||||
* killjobc() might drop and re-acquire proctree_lock to
|
||||
|
|
|
|||
Loading…
Reference in a new issue