mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 07:31:53 -07:00
reset sigmask on fork
This commit is contained in:
@@ -379,6 +379,11 @@ void CConfigManager::handleRawExec(const std::string& command, const std::string
|
|||||||
if (child == 0) {
|
if (child == 0) {
|
||||||
// run in child
|
// run in child
|
||||||
grandchild = fork();
|
grandchild = fork();
|
||||||
|
|
||||||
|
sigset_t set;
|
||||||
|
sigemptyset(&set);
|
||||||
|
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||||
|
|
||||||
if (grandchild == 0) {
|
if (grandchild == 0) {
|
||||||
// run in grandchild
|
// run in grandchild
|
||||||
close(socket[0]);
|
close(socket[0]);
|
||||||
|
@@ -500,6 +500,11 @@ void CKeybindManager::spawn(std::string args) {
|
|||||||
}
|
}
|
||||||
if (child == 0) {
|
if (child == 0) {
|
||||||
// run in child
|
// run in child
|
||||||
|
|
||||||
|
sigset_t set;
|
||||||
|
sigemptyset(&set);
|
||||||
|
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||||
|
|
||||||
grandchild = fork();
|
grandchild = fork();
|
||||||
if (grandchild == 0) {
|
if (grandchild == 0) {
|
||||||
// run in grandchild
|
// run in grandchild
|
||||||
|
Reference in New Issue
Block a user