mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-20 01:42:38 +02:00
Merge pull request #370 from toke/bugfix/upstream-369
Prevent zombie apocalypse by ignoring SIGCHLD
This commit is contained in:
@@ -90,6 +90,8 @@ inline int32_t forkExec(std::string cmd) {
|
|||||||
setpgid(pid, pid);
|
setpgid(pid, pid);
|
||||||
execl("/bin/sh", "sh", "-c", cmd.c_str(), (char*)0);
|
execl("/bin/sh", "sh", "-c", cmd.c_str(), (char*)0);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
} else {
|
||||||
|
signal(SIGCHLD,SIG_IGN);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pid;
|
return pid;
|
||||||
|
Reference in New Issue
Block a user