diff options
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index d6aec28..b88bcd4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2197,11 +2197,9 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) if (action == SIG_HOLD && !((prop & SA_CONT) && (p->p_flag & P_STOPPED_SIG))) return (ret); - /* - * SIGKILL: Remove procfs STOPEVENTs and ptrace events. - */ + + /* SIGKILL: Remove procfs STOPEVENTs. */ if (sig == SIGKILL) { - p->p_ptevents = 0; /* from procfs_ioctl.c: PIOCBIC */ p->p_stops = 0; /* from procfs_ioctl.c: PIOCCONT */ @@ -2824,14 +2822,15 @@ issignal(struct thread *td) break; /* == ignore */ } /* - * If there is a pending stop signal to process - * with default action, stop here, - * then clear the signal. However, - * if process is member of an orphaned - * process group, ignore tty stop signals. + * If there is a pending stop signal to process with + * default action, stop here, then clear the signal. + * Traced or exiting processes should ignore stops. + * Additionally, a member of an orphaned process group + * should ignore tty stops. */ if (prop & SA_STOP) { - if (p->p_flag & (P_TRACED|P_WEXIT) || + if (p->p_flag & + (P_TRACED | P_WEXIT | P_SINGLE_EXIT) || (p->p_pgrp->pg_jobc == 0 && prop & SA_TTYSTOP)) break; /* == ignore */ |