1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

HackStudio: Handle failed fork() in TerminalWrapper a bit better

This commit is contained in:
Andreas Kling 2021-01-23 08:39:59 +01:00
parent e937012870
commit c5df0532c0

View file

@ -88,6 +88,11 @@ void TerminalWrapper::run_command(const String& command)
};
m_pid = fork();
if (m_pid < 0) {
perror("fork");
return;
}
if (m_pid == 0) {
// Create a new process group.
setsid();