* Send queued SIGCHLD to parent when child process's state * is changed. */
| 3323 | * is changed. |
| 3324 | */ |
| 3325 | static void |
| 3326 | sigparent(struct proc *p, int reason, int status) |
| 3327 | { |
| 3328 | PROC_LOCK_ASSERT(p, MA_OWNED); |
| 3329 | PROC_LOCK_ASSERT(p->p_pptr, MA_OWNED); |
| 3330 | |
| 3331 | if (p->p_ksi != NULL) { |
| 3332 | p->p_ksi->ksi_signo = SIGCHLD; |
| 3333 | p->p_ksi->ksi_code = reason; |
| 3334 | p->p_ksi->ksi_status = status; |
| 3335 | p->p_ksi->ksi_pid = p->p_pid; |
| 3336 | p->p_ksi->ksi_uid = p->p_ucred->cr_ruid; |
| 3337 | if (KSI_ONQ(p->p_ksi)) |
| 3338 | return; |
| 3339 | } |
| 3340 | pksignal(p->p_pptr, SIGCHLD, p->p_ksi); |
| 3341 | } |
| 3342 | |
| 3343 | static void |
| 3344 | childproc_jobstate(struct proc *p, int reason, int sig) |
no test coverage detected