summaryrefslogtreecommitdiff
path: root/sysproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysproc.c')
-rw-r--r--sysproc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysproc.c b/sysproc.c
index 4a9c8de..990a426 100644
--- a/sysproc.c
+++ b/sysproc.c
@@ -7,12 +7,14 @@
int
sys_fork(void)
{
+ int pid;
struct proc *np;
if((np = copyproc(cp)) == 0)
return -1;
+ pid = np->pid;
np->state = RUNNABLE;
- return np->pid;
+ return pid;
}
int