diff options
author | vaxerski <[email protected]> | 2022-10-06 19:02:03 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-10-06 19:02:03 +0100 |
commit | 922e978f56ed8a00700ed7730ea56bd1e10665b3 (patch) | |
tree | e29d2e0bb11e51dbd7f90e289868b2506d33d302 | |
parent | 0508c7d3849fe2f557851619b0eb877b80112c66 (diff) | |
download | Hyprland-922e978f56ed8a00700ed7730ea56bd1e10665b3.tar.gz Hyprland-922e978f56ed8a00700ed7730ea56bd1e10665b3.zip |
reset sigmask on fork
-rw-r--r-- | src/config/ConfigManager.cpp | 5 | ||||
-rw-r--r-- | src/managers/KeybindManager.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
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 |