Shell: Refuse to be suspended with ^Z

Suspending the shell while interacting with it is pretty weird, so let's
just disallow this behaviour.
This commit is contained in:
AnotherTest 2020-05-25 23:43:43 +04:30 committed by Andreas Kling
parent 2814b5a918
commit 42114c5784
Notes: sideshowbarker 2024-07-19 06:08:46 +09:00

View File

@ -104,6 +104,9 @@ int main(int argc, char** argv)
}
});
// Ignore SIGTSTP as the shell should not be suspended with ^Z.
signal(SIGTSTP, [](auto) {});
if (argc > 2 && !strcmp(argv[1], "-c")) {
dbgprintf("sh -c '%s'\n", argv[2]);
shell->run_command(argv[2]);