aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/programs/init.c
diff options
context:
space:
mode:
authorMarvin Borner2020-05-07 14:29:28 +0200
committerMarvin Borner2020-05-07 14:29:28 +0200
commit130121dd61a9adf70d1800ceb03007275bfb589d (patch)
tree5b00d9046c5f5a5678479b0ddf1bdbe72bc74158 /src/userspace/programs/init.c
parent31767b532e69c5a63df0106fa08e137e3106a449 (diff)
Added wait syscall
Diffstat (limited to 'src/userspace/programs/init.c')
-rw-r--r--src/userspace/programs/init.c9
1 files changed, 3 insertions, 6 deletions
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