From 455d9e675dd243e9147bce23c226cb0c60ec0ec4 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 13 Oct 2021 21:50:25 +0200 Subject: init/shell: add the fork command --- src/init/shell.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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"); } -- cgit v1.2.3