Support exit status for exit/wait

One test case for returning a exit status
Passes usertests, but haven't used it to simplify tests
This commit is contained in:
Frans Kaashoek 2019-09-10 12:30:10 -04:00
parent 035cca95fe
commit 7e6c37e67e
22 changed files with 319 additions and 297 deletions

View file

@ -10,7 +10,10 @@
uint64
sys_exit(void)
{
exit();
int n;
if(argint(0, &n) < 0)
return -1;
exit(n);
return 0; // not reached
}
@ -29,7 +32,10 @@ sys_fork(void)
uint64
sys_wait(void)
{
return wait();
uint64 p;
if(argaddr(0, &p) < 0)
return -1;
return wait(p);
}
uint64