diff options
author | Marvin Borner | 2020-05-07 00:16:52 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-07 00:16:52 +0200 |
commit | 31767b532e69c5a63df0106fa08e137e3106a449 (patch) | |
tree | ea7a91347e030c0b120361b7d9975547a5af19d1 /src/userspace/programs | |
parent | 8083536f321ad8a12ad4668c2bf41a65c3e3b2f6 (diff) |
Some fixes here and there...
Also implemented serial console in userspace
Diffstat (limited to 'src/userspace/programs')
-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"); |