Skip to content
Snippets Groups Projects
Commit dae9b0d4 authored by rsc's avatar rsc
Browse files

missed this file in last checkin

parent 19333efb
No related branches found
No related tags found
No related merge requests found
#include "types.h"
#include "x86.h"
#include "defs.h"
#include "param.h"
#include "mmu.h"
......@@ -13,6 +14,9 @@ sys_fork(void)
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;
}
......@@ -54,7 +58,8 @@ sys_sbrk(void)
if(argint(0, &n) < 0)
return -1;
if((addr = growproc(n)) < 0)
addr = cp->sz;
if(growproc(n) < 0)
return -1;
return addr;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment