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

Function siginit

freebsd/kern/kern_sig.c:945–961  ·  view source on GitHub ↗

* Initialize signal state for process 0; * set to ignore signals that are ignored by default. */

Source from the content-addressed store, hash-verified

943 * set to ignore signals that are ignored by default.
944 */
945void
946siginit(struct proc *p)
947{
948 int i;
949 struct sigacts *ps;
950
951 PROC_LOCK(p);
952 ps = p->p_sigacts;
953 mtx_lock(&ps->ps_mtx);
954 for (i = 1; i <= NSIG; i++) {
955 if (sigprop(i) & SIGPROP_IGNORE && i != SIGCONT) {
956 SIGADDSET(ps->ps_sigignore, i);
957 }
958 }
959 mtx_unlock(&ps->ps_mtx);
960 PROC_UNLOCK(p);
961}
962
963/*
964 * Reset specified signal to the default disposition.

Callers 2

proc0_initFunction · 0.85
proc0_initFunction · 0.85

Calls 3

sigpropFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected