From 130121dd61a9adf70d1800ceb03007275bfb589d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 7 May 2020 14:29:28 +0200 Subject: Added wait syscall --- src/userspace/programs/init.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/userspace/programs/init.c') diff --git a/src/userspace/programs/init.c b/src/userspace/programs/init.c index 68d025c..f3ca614 100644 --- a/src/userspace/programs/init.c +++ b/src/userspace/programs/init.c @@ -10,16 +10,13 @@ void main() // TODO: Fix page fault when mallocing printf("Initializing userspace...\n"); - // TODO: Implement wait syscall - int x; - int f = fork(); + u32 x; + u32 f = fork(); if (f == 0) - ; //wait(&x); + wait(&x); else exec("/bin/sh"); - //syscall_exec("/bin/sh"); - while (1) { }; } \ No newline at end of file -- cgit v1.2.3