Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_prf.c
Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | if (TD_IS_IDLETHREAD(td)) | ||||
return (0); | return (0); | ||||
sx_slock(&proctree_lock); | sx_slock(&proctree_lock); | ||||
p = td->td_proc; | p = td->td_proc; | ||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
if ((p->p_flag & P_CONTROLT) == 0) { | if ((p->p_flag & P_CONTROLT) == 0) { | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
sx_sunlock(&proctree_lock); | sx_sunlock(&proctree_lock); | ||||
if (p == initproc) { | |||||
/* Produce output when we fail to load /sbin/init: */ | |||||
va_start(ap, fmt); | |||||
vprintf(fmt, ap); | |||||
va_end(ap); | |||||
} | |||||
return (0); | return (0); | ||||
} | } | ||||
SESS_LOCK(p->p_session); | SESS_LOCK(p->p_session); | ||||
pca.tty = p->p_session->s_ttyp; | pca.tty = p->p_session->s_ttyp; | ||||
SESS_UNLOCK(p->p_session); | SESS_UNLOCK(p->p_session); | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
if (pca.tty == NULL) { | if (pca.tty == NULL) { | ||||
sx_sunlock(&proctree_lock); | sx_sunlock(&proctree_lock); | ||||
▲ Show 20 Lines • Show All 1,106 Lines • Show Last 20 Lines |