diff options
Diffstat (limited to 'src/userspace/programs/init.c')
-rw-r--r-- | src/userspace/programs/init.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/userspace/programs/init.c b/src/userspace/programs/init.c index 5ff1864..68d025c 100644 --- a/src/userspace/programs/init.c +++ b/src/userspace/programs/init.c @@ -5,17 +5,18 @@ #include <unistd.h> #include <gui.h> -void test(u8 *data) -{ - syscall_halt(); -} - void main() { - /* gui_init(); */ - /* gui_screen_clear(); */ - //printf("Initializing userspace...\n"); - syscall_map(MAP_KEYBOARD, (u8 *)&test); + // TODO: Fix page fault when mallocing + printf("Initializing userspace...\n"); + + // TODO: Implement wait syscall + int x; + int f = fork(); + if (f == 0) + ; //wait(&x); + else + exec("/bin/sh"); //syscall_exec("/bin/sh"); |