summaryrefslogtreecommitdiff
path: root/sysproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysproc.c')
-rw-r--r--sysproc.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sysproc.c b/sysproc.c
index da01b5b..5ecbf2b 100644
--- a/sysproc.c
+++ b/sysproc.c
@@ -8,17 +8,7 @@
int
sys_fork(void)
{
- int pid;
- struct proc *np;
-
- if((np = copyproc(cp)) == 0)
- return -1;
- pid = np->pid;
-
- // Clear %eax so that fork returns 0 in the child.
- np->tf->eax = 0;
- np->state = RUNNABLE;
- return pid;
+ return fork();
}
int