mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
HackStudio: Handle failed fork() in TerminalWrapper a bit better
This commit is contained in:
parent
e937012870
commit
c5df0532c0
Notes:
sideshowbarker
2024-07-18 22:56:13 +09:00
Author: https://github.com/awesomekling
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();
|
m_pid = fork();
|
||||||
|
if (m_pid < 0) {
|
||||||
|
perror("fork");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_pid == 0) {
|
if (m_pid == 0) {
|
||||||
// Create a new process group.
|
// Create a new process group.
|
||||||
setsid();
|
setsid();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue