diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index c1ea3e01..da954cf9 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -379,6 +379,11 @@ void CConfigManager::handleRawExec(const std::string& command, const std::string if (child == 0) { // run in child grandchild = fork(); + + sigset_t set; + sigemptyset(&set); + sigprocmask(SIG_SETMASK, &set, NULL); + if (grandchild == 0) { // run in grandchild close(socket[0]); diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index d61bf7fd..3e00ea09 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -500,6 +500,11 @@ void CKeybindManager::spawn(std::string args) { } if (child == 0) { // run in child + + sigset_t set; + sigemptyset(&set); + sigprocmask(SIG_SETMASK, &set, NULL); + grandchild = fork(); if (grandchild == 0) { // run in grandchild