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:
parent
e937012870
commit
c5df0532c0
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue