Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/init_main.c
Show First 20 Lines • Show All 856 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
proc_set_cred(initproc, newcred); | proc_set_cred(initproc, newcred); | ||||
td = FIRST_THREAD_IN_PROC(initproc); | td = FIRST_THREAD_IN_PROC(initproc); | ||||
crfree(td->td_ucred); | crfree(td->td_ucred); | ||||
td->td_ucred = crhold(initproc->p_ucred); | td->td_ucred = crhold(initproc->p_ucred); | ||||
PROC_UNLOCK(initproc); | PROC_UNLOCK(initproc); | ||||
sx_xunlock(&proctree_lock); | sx_xunlock(&proctree_lock); | ||||
crfree(oldcred); | crfree(oldcred); | ||||
cpu_set_fork_handler(FIRST_THREAD_IN_PROC(initproc), start_init, NULL); | cpu_fork_kthread_handler(FIRST_THREAD_IN_PROC(initproc), | ||||
start_init, NULL); | |||||
} | } | ||||
SYSINIT(init, SI_SUB_CREATE_INIT, SI_ORDER_FIRST, create_init, NULL); | SYSINIT(init, SI_SUB_CREATE_INIT, SI_ORDER_FIRST, create_init, NULL); | ||||
/* | /* | ||||
* Make it runnable now. | * Make it runnable now. | ||||
*/ | */ | ||||
static void | static void | ||||
kick_init(const void *udata __unused) | kick_init(const void *udata __unused) | ||||
Show All 10 Lines |