diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_exec.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_exit.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_kse.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index dac4475..44f5e75 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -266,6 +266,9 @@ kern_execve(td, fname, argv, envv, mac_p) */ p->p_flag &= ~P_SA; td->td_mailbox = NULL; + mtx_lock_spin(&sched_lock); + td->td_flags &= ~TDF_SA; + mtx_unlock_spin(&sched_lock); thread_single_end(); } p->p_flag |= P_INEXEC; diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 8a2b511..c39ed6f 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -162,6 +162,9 @@ exit1(struct thread *td, int rv) * Turn off threading support. */ p->p_flag &= ~P_SA; + mtx_lock_spin(&sched_lock); + td->td_flags &= ~TDF_SA; + mtx_unlock_spin(&sched_lock); thread_single_end(); /* Don't need this any more. */ } diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 43b0f74..88b2689 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -2217,7 +2217,7 @@ thread_single_end(void) td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); - p->p_flag &= ~P_STOPPED_SINGLE; + p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT); mtx_lock_spin(&sched_lock); p->p_singlethread = NULL; /* diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 43b0f74..88b2689 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -2217,7 +2217,7 @@ thread_single_end(void) td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); - p->p_flag &= ~P_STOPPED_SINGLE; + p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT); mtx_lock_spin(&sched_lock); p->p_singlethread = NULL; /* |