aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 421f478..037026b 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -63,7 +63,7 @@ fork1(struct proc *cur, int flags, void(*ip)(void), struct proc **newprocp)
if (newprocp != NULL)
*newprocp = newproc;
- newproc->pid = nthreads++;
+ newproc->pid = ++nthreads;
sched_enqueue_td(newproc);
done:
if (status != 0)