Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_fork.c
Show First 20 Lines • Show All 445 Lines • ▼ Show 20 Lines | if (fr->fr_flags & RFCFDG) { | ||||
if (p1->p_fdtol == NULL) | if (p1->p_fdtol == NULL) | ||||
p1->p_fdtol = filedesc_to_leader_alloc(NULL, NULL, | p1->p_fdtol = filedesc_to_leader_alloc(NULL, NULL, | ||||
p1->p_leader); | p1->p_leader); | ||||
if ((fr->fr_flags & RFTHREAD) != 0) { | if ((fr->fr_flags & RFTHREAD) != 0) { | ||||
/* | /* | ||||
* Shared file descriptor table, and shared | * Shared file descriptor table, and shared | ||||
* process leaders. | * process leaders. | ||||
*/ | */ | ||||
fdtol = p1->p_fdtol; | fdtol = filedesc_to_leader_share(p1->p_fdtol, p1->p_fd); | ||||
FILEDESC_XLOCK(p1->p_fd); | |||||
fdtol->fdl_refcount++; | |||||
FILEDESC_XUNLOCK(p1->p_fd); | |||||
} else { | } else { | ||||
/* | /* | ||||
* Shared file descriptor table, and different | * Shared file descriptor table, and different | ||||
* process leaders. | * process leaders. | ||||
*/ | */ | ||||
fdtol = filedesc_to_leader_alloc(p1->p_fdtol, | fdtol = filedesc_to_leader_alloc(p1->p_fdtol, | ||||
p1->p_fd, p2); | p1->p_fd, p2); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 726 Lines • Show Last 20 Lines |