diff options
| author | John-Mark Gurney <jmg@FreeBSD.org> | 2004-03-10 00:27:36 +0000 |
|---|---|---|
| committer | John-Mark Gurney <jmg@FreeBSD.org> | 2004-03-10 00:27:36 +0000 |
| commit | 0235bf026125c4f3e5e890582bd0b7da14595534 (patch) | |
| tree | 90e335081c7672bb833484ea8908bdc0e561ee49 | |
| parent | c2026e4db25474417098071edfb3222c09d04680 (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_fork.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 34a1bfd64ac2..fd229c9ad098 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -232,7 +232,9 @@ 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; } @@ -428,7 +430,9 @@ 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); |
