From 6346d1b6c7c258e97f04c9c21630bf6f5163a683 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 2 Jun 2024 17:27:40 +0300 Subject: [PATCH] Shell: Add builtin command for starting window server and test windows --- userspace/Shell/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/userspace/Shell/main.cpp b/userspace/Shell/main.cpp index 1cb4844d..6b9c2171 100644 --- a/userspace/Shell/main.cpp +++ b/userspace/Shell/main.cpp @@ -331,6 +331,17 @@ BAN::Optional execute_builtin(BAN::Vector& args, int fd_in, in while (*current) fprintf(fout, "%s\n", *current++); } + else if (args.front() == "start-gui"sv) + { + pid_t pid = fork(); + if (pid == 0) + execl("/bin/WindowServer", "WindowServer", NULL); + if (fork() == 0) + execl("/bin/test-window", "test-window", NULL); + if (fork() == 0) + execl("/bin/test-window", "test-window", NULL); + waitpid(pid, nullptr, 0); + } else if (args.front() == "page-fault-test"sv) { volatile int* ptr = nullptr;