diff --git a/kernel/terminal.cpp b/kernel/terminal.cpp index 9fdd5d99d..8e410a09c 100644 --- a/kernel/terminal.cpp +++ b/kernel/terminal.cpp @@ -483,6 +483,14 @@ void Terminal::ExecuteLine() { {4, 4}, {8*kColumns, 16*kRows}, {0, 0, 0}); } cursor_.y = 0; + } else if (strcmp(command, "exit") == 0) { + if (show_window_) { + CloseLayer(layer_id_); + } + int exit_code = 0; + if (first_arg) exit_code = atoi(first_arg); + __asm__("cli"); + task_manager->Finish(exit_code); } else if (strcmp(command, "lspci") == 0) { for (int i = 0; i < pci::num_device; ++i) { const auto& dev = pci::devices[i];