diff options
author | alfred <alfred@FreeBSD.org> | 2003-01-01 01:01:14 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2003-01-01 01:01:14 +0000 |
commit | 11118a80282743ed594d627e26c4007bcf1013bf (patch) | |
tree | 04b5ebad0155684fd0a069e7d13afa8415032941 /sys/kern/kern_fork.c | |
parent | b3883074cb4bda7291c2a017dae9f062be0f7b57 (diff) | |
download | FreeBSD-src-11118a80282743ed594d627e26c4007bcf1013bf.zip FreeBSD-src-11118a80282743ed594d627e26c4007bcf1013bf.tar.gz |
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.
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 1a8e4d2..7aa0dc0 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. |