diff options
author | dzwdz | 2021-10-13 21:50:25 +0200 |
---|---|---|
committer | dzwdz | 2021-10-13 21:50:25 +0200 |
commit | 455d9e675dd243e9147bce23c226cb0c60ec0ec4 (patch) | |
tree | 798ea3fa1d390e378da1428cb79c6bfef7880f49 /src | |
parent | 04c907ca9e9ed5d2f05ebbdfc4fe47b9dc4a11e0 (diff) |
init/shell: add the fork command
Diffstat (limited to 'src')
-rw-r--r-- | src/init/shell.c | 3 |
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"); } |