summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordzwdz2021-10-13 21:50:25 +0200
committerdzwdz2021-10-13 21:50:25 +0200
commit455d9e675dd243e9147bce23c226cb0c60ec0ec4 (patch)
tree798ea3fa1d390e378da1428cb79c6bfef7880f49 /src
parent04c907ca9e9ed5d2f05ebbdfc4fe47b9dc4a11e0 (diff)
init/shell: add the fork command
Diffstat (limited to 'src')
-rw-r--r--src/init/shell.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init/shell.c b/src/init/shell.c
index 6b195cc..6e1dee2 100644
--- a/src/init/shell.c
+++ b/src/init/shell.c
@@ -72,6 +72,9 @@ void shell_loop(void) {
cmd_cat(args);
} else if (!strcmp(cmd, "exit")) {
_syscall_exit(0);
+ } else if (!strcmp(cmd, "fork")) {
+ if (_syscall_fork())
+ _syscall_await();
} else {
printf("unknown command :(\n");
}