Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_sig.c
Show First 20 Lines • Show All 2,221 Lines • ▼ Show 20 Lines | if (prop & SIGPROP_CONT) | ||||
sigqueue_delete_stopmask_proc(p); | sigqueue_delete_stopmask_proc(p); | ||||
else if (prop & SIGPROP_STOP) { | else if (prop & SIGPROP_STOP) { | ||||
/* | /* | ||||
* If sending a tty stop signal to a member of an orphaned | * If sending a tty stop signal to a member of an orphaned | ||||
* process group, discard the signal here if the action | * process group, discard the signal here if the action | ||||
* is default; don't stop the process below if sleeping, | * is default; don't stop the process below if sleeping, | ||||
* and don't clear any pending SIGCONT. | * and don't clear any pending SIGCONT. | ||||
*/ | */ | ||||
if ((prop & SIGPROP_TTYSTOP) && | if ((prop & SIGPROP_TTYSTOP) != 0 && | ||||
(p->p_pgrp->pg_jobc == 0) && | p->p_pgrp->pg_jobc == 0 && | ||||
(action == SIG_DFL)) { | action == SIG_DFL) { | ||||
if (ksi && (ksi->ksi_flags & KSI_INS)) | if (ksi && (ksi->ksi_flags & KSI_INS)) | ||||
ksiginfo_tryfree(ksi); | ksiginfo_tryfree(ksi); | ||||
return (ret); | return (ret); | ||||
} | } | ||||
sigqueue_delete_proc(p, SIGCONT); | sigqueue_delete_proc(p, SIGCONT); | ||||
if (p->p_flag & P_CONTINUED) { | if (p->p_flag & P_CONTINUED) { | ||||
p->p_flag &= ~P_CONTINUED; | p->p_flag &= ~P_CONTINUED; | ||||
PROC_LOCK(p->p_pptr); | PROC_LOCK(p->p_pptr); | ||||
▲ Show 20 Lines • Show All 738 Lines • ▼ Show 20 Lines | #endif | ||||
/* | /* | ||||
* If there is a pending stop signal to process with | * If there is a pending stop signal to process with | ||||
* default action, stop here, then clear the signal. | * default action, stop here, then clear the signal. | ||||
* Traced or exiting processes should ignore stops. | * Traced or exiting processes should ignore stops. | ||||
* Additionally, a member of an orphaned process group | * Additionally, a member of an orphaned process group | ||||
* should ignore tty stops. | * should ignore tty stops. | ||||
*/ | */ | ||||
if (prop & SIGPROP_STOP) { | if (prop & SIGPROP_STOP) { | ||||
if (p->p_flag & | if ((p->p_flag & (P_TRACED | P_WEXIT | | ||||
(P_TRACED | P_WEXIT | P_SINGLE_EXIT) || | P_SINGLE_EXIT)) != 0 || | ||||
(p->p_pgrp->pg_jobc == 0 && | (p->p_pgrp->pg_jobc == 0 && | ||||
prop & SIGPROP_TTYSTOP)) | (prop & SIGPROP_TTYSTOP) != 0)) | ||||
break; /* == ignore */ | break; /* == ignore */ | ||||
if (TD_SBDRY_INTR(td)) { | if (TD_SBDRY_INTR(td)) { | ||||
KASSERT((td->td_flags & TDF_SBDRY) != 0, | KASSERT((td->td_flags & TDF_SBDRY) != 0, | ||||
("lost TDF_SBDRY")); | ("lost TDF_SBDRY")); | ||||
return (-1); | return (-1); | ||||
} | } | ||||
mtx_unlock(&ps->ps_mtx); | mtx_unlock(&ps->ps_mtx); | ||||
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, | WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, | ||||
▲ Show 20 Lines • Show All 1,252 Lines • Show Last 20 Lines |