summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-11-07 12:39:28 +0000
committerphk <phk@FreeBSD.org>2004-11-07 12:39:28 +0000
commit418eb9d34be916bd06097f00f2a07385d45875ca (patch)
treeb778d7d845b50f925b6ffecdf43d8852fd9a5b5e /sys/kern/kern_fork.c
parent7cec18a1415495e8138a2bb88872fe735843e063 (diff)
downloadFreeBSD-src-418eb9d34be916bd06097f00f2a07385d45875ca.zip
FreeBSD-src-418eb9d34be916bd06097f00f2a07385d45875ca.tar.gz
Allow fdinit() to be called with a NULL fdp argument so we can use
it when setting up init. Make fdinit() lock the fdp argument as needed.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 714a1af..f90ff32 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -225,9 +225,7 @@ fork1(td, flags, pages, procp)
*/
if (flags & RFCFDG) {
struct filedesc *fdtmp;
- FILEDESC_LOCK(td->td_proc->p_fd);
fdtmp = fdinit(td->td_proc->p_fd);
- FILEDESC_UNLOCK(td->td_proc->p_fd);
fdfree(td);
p1->p_fd = fdtmp;
}
@@ -423,9 +421,7 @@ again:
* Copy filedesc.
*/
if (flags & RFCFDG) {
- FILEDESC_LOCK(td->td_proc->p_fd);
fd = fdinit(td->td_proc->p_fd);
- FILEDESC_UNLOCK(td->td_proc->p_fd);
fdtol = NULL;
} else if (flags & RFFDG) {
FILEDESC_LOCK(p1->p_fd);
OpenPOWER on IntegriCloud