diff options
author | vaxerski <[email protected]> | 2022-11-13 19:53:27 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-11-13 19:53:27 +0000 |
commit | 478fa7cafea63a2008184a756045c43ed803310f (patch) | |
tree | e776439034f9bafe997f42c94a6da8b03aedfc52 | |
parent | 549fdf63f6f72fadf4e1f67f42fc2a99d625b42e (diff) | |
download | Hyprland-478fa7cafea63a2008184a756045c43ed803310f.tar.gz Hyprland-478fa7cafea63a2008184a756045c43ed803310f.zip |
Revert "Set child stdout and stderr to /dev/null (#1000)"
This reverts commit 1e5cab1ee7a82d3381f55963a0ff768c30215602.
Breaks a bunch of stuff, e.g. Waybar.
-rw-r--r-- | src/managers/KeybindManager.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 86248861..a529da97 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1,7 +1,5 @@ #include "KeybindManager.hpp" -#include <fcntl.h> -#include <paths.h> #include <regex> CKeybindManager::CKeybindManager() { @@ -528,25 +526,6 @@ void CKeybindManager::spawn(std::string args) { // run in grandchild close(socket[0]); close(socket[1]); - close(STDOUT_FILENO); - close(STDERR_FILENO); - - int devnull = open(_PATH_DEVNULL, O_WRONLY); - if (devnull == -1) { - Debug::log(LOG, "Unable to open /dev/null for writing"); - return; - } - - if (dup2(devnull, STDOUT_FILENO) == -1) { - Debug::log(LOG, "Unable to duplicate /dev/null to stdout"); - return; - } - if (dup2(devnull, STDERR_FILENO) == -1) { - Debug::log(LOG, "Unable to duplicate /dev/null to stderr"); - return; - } - - close(devnull); execl("/bin/sh", "/bin/sh", "-c", args.c_str(), nullptr); // exit grandchild _exit(0); |