MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sigparent

Function sigparent

freebsd/kern/kern_sig.c:3325–3341  ·  view source on GitHub ↗

* Send queued SIGCHLD to parent when child process's state * is changed. */

Source from the content-addressed store, hash-verified

3323 * is changed.
3324 */
3325static void
3326sigparent(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
3343static void
3344childproc_jobstate(struct proc *p, int reason, int sig)

Callers 2

childproc_jobstateFunction · 0.85
childproc_exitedFunction · 0.85

Calls 1

pksignalFunction · 0.85

Tested by

no test coverage detected