summaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2002-12-10 02:33:45 +0000
committerJulian Elischer <julian@FreeBSD.org>2002-12-10 02:33:45 +0000
commit696058c3c557ad790e659e93aedf0f69ba41a1ff (patch)
treeb7b4d7891168c36af86fd5540478865532fe8977 /sys/kern/kern_fork.c
parentbdaf0d3b7df55d2c25b6511f62a63b2cbc7e0d35 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index caefeff4ee5f..c63a839a5876 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -834,9 +834,15 @@ fork_exit(callout, arg, frame)
void *arg;
struct trapframe *frame;
{
- struct thread *td = curthread;
- struct proc *p = td->td_proc;
+ struct thread *td;
+ struct proc *p;
+ if ((td = PCPU_GET(deadthread))) {
+ PCPU_SET(deadthread, NULL);
+ thread_stash(td);
+ }
+ td = curthread;
+ p = td->td_proc;
td->td_kse->ke_oncpu = PCPU_GET(cpuid);
p->p_state = PRS_NORMAL;
/*