Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_fork.c
Show First 20 Lines • Show All 557 Lines • ▼ Show 20 Lines | #endif | ||||
PROC_LOCK(p2); | PROC_LOCK(p2); | ||||
PROC_LOCK(p1); | PROC_LOCK(p1); | ||||
/* | /* | ||||
* Preserve some more flags in subprocess. P_PROFIL has already | * Preserve some more flags in subprocess. P_PROFIL has already | ||||
* been preserved. | * been preserved. | ||||
*/ | */ | ||||
p2->p_flag |= p1->p_flag & P_SUGID; | p2->p_flag |= p1->p_flag & P_SUGID; | ||||
td2->td_pflags |= (td->td_pflags & TDP_ALTSTACK) | TDP_FORKING; | td2->td_pflags |= (td->td_pflags & (TDP_ALTSTACK | | ||||
TDP_FAST_SIGBLOCK)) | TDP_FORKING; | |||||
SESS_LOCK(p1->p_session); | SESS_LOCK(p1->p_session); | ||||
if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT) | if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT) | ||||
p2->p_flag |= P_CONTROLT; | p2->p_flag |= P_CONTROLT; | ||||
SESS_UNLOCK(p1->p_session); | SESS_UNLOCK(p1->p_session); | ||||
if (fr->fr_flags & RFPPWAIT) | if (fr->fr_flags & RFPPWAIT) | ||||
p2->p_flag |= P_PPWAIT; | p2->p_flag |= P_PPWAIT; | ||||
p2->p_pgrp = p1->p_pgrp; | p2->p_pgrp = p1->p_pgrp; | ||||
▲ Show 20 Lines • Show All 552 Lines • Show Last 20 Lines |