From 215738336aec0d5118a90a79d380c41910f6ee4b Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 31 May 2009 00:38:51 +0000 Subject: move fork into proc.c --- sysproc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'sysproc.c') 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 -- cgit v1.2.3