From c7f1c11b205a9632c15924b49c25e55dc0f33ed8 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Wed, 1 Jan 2003 01:01:14 +0000 Subject: Since fdshare() and fdinit() only operate on filedescs, make them take pointers to filedesc structures instead of threads. This makes it more clear that they do not do any voodoo with the thread/proc or anything other than the filedesc passed in or returned. Remove some XXX KSE's as this resolves the issue. --- sys/kern/kern_fork.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/kern/kern_fork.c') diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 1a8e4d25904c..7aa0dc0d935a 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -258,8 +258,8 @@ fork1(td, flags, pages, procp) */ if (flags & RFCFDG) { struct filedesc *fdtmp; - fdtmp = fdinit(td); /* XXXKSE */ - fdfree(td); /* XXXKSE */ + fdtmp = fdinit(td->td_proc->p_fd); + fdfree(td); p1->p_fd = fdtmp; } @@ -445,13 +445,13 @@ again: * arguments or something. */ if (flags & RFCFDG) - fd = fdinit(td); + fd = fdinit(td->td_proc->p_fd); else if (flags & RFFDG) { FILEDESC_LOCK(p1->p_fd); fd = fdcopy(td); FILEDESC_UNLOCK(p1->p_fd); } else - fd = fdshare(p1); + fd = fdshare(p1->p_fd); /* * Make a proc table entry for the new process. -- cgit v1.2.3