diff --git a/user/test/forktest.c b/user/test/forktest.c new file mode 100644 index 0000000..6e8a812 --- /dev/null +++ b/user/test/forktest.c @@ -0,0 +1,17 @@ +#include "library/syscalls.h" +#include "library/string.h" + +int main(int argc, char *argv[]) +{ + printf("hello world, I am %d.\n", syscall_process_self()); + int x = syscall_process_fork(); + printf("My fork returned %d\n", x); + + printf("Some numbers:\n"); + + int i; + for(i = 0; i < 5; ++i) { + printf("%d\n", i); + } + return 0; +}