summaryrefslogtreecommitdiff
path: root/kernel/sysproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sysproc.c')
-rw-r--r--kernel/sysproc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/sysproc.c b/kernel/sysproc.c
index face81a..e8bcda9 100644
--- a/kernel/sysproc.c
+++ b/kernel/sysproc.c
@@ -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