diff --git a/main/gui/source/window/linux_window.cpp b/main/gui/source/window/linux_window.cpp index 93c54911e182e..c7e6d81304966 100644 --- a/main/gui/source/window/linux_window.cpp +++ b/main/gui/source/window/linux_window.cpp @@ -14,7 +14,6 @@ #include #include - #include #include #include @@ -137,11 +136,6 @@ namespace hex { setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true); } - // Various libraries sadly directly print to stderr with no way to disable it - // We redirect stderr to /dev/null to prevent this - wolv::util::unused(freopen("/dev/null", "w", stderr)); - setvbuf(stderr, nullptr, _IONBF, 0); - // Redirect stdout to log file if we're not running in a terminal if (!isatty(STDOUT_FILENO)) { log::impl::redirectToFile(); diff --git a/main/gui/source/window/macos_window.cpp b/main/gui/source/window/macos_window.cpp index 50d1b4c4d4dd1..92f20acb77bc4 100644 --- a/main/gui/source/window/macos_window.cpp +++ b/main/gui/source/window/macos_window.cpp @@ -11,7 +11,6 @@ #include #include - #include #include #include @@ -41,11 +40,6 @@ namespace hex { setenv("LD_LIBRARY_PATH", hex::format("{};{}", hex::getEnvironmentVariable("LD_LIBRARY_PATH").value_or(""), path.string().c_str()).c_str(), true); } - // Various libraries sadly directly print to stderr with no way to disable it - // We redirect stderr to /dev/null to prevent this - freopen("/dev/null", "w", stderr); - setvbuf(stderr, nullptr, _IONBF, 0); - // Redirect stdout to log file if we're not running in a terminal if (!isatty(STDOUT_FILENO)) { log::impl::redirectToFile(); diff --git a/main/gui/source/window/win_window.cpp b/main/gui/source/window/win_window.cpp index 987f6b51f0e50..42493b18b31c6 100644 --- a/main/gui/source/window/win_window.cpp +++ b/main/gui/source/window/win_window.cpp @@ -29,8 +29,6 @@ #include #include - #include - namespace hex { template @@ -422,12 +420,6 @@ namespace hex { reopenConsoleHandle(STD_INPUT_HANDLE, STDIN_FILENO, stdin); reopenConsoleHandle(STD_OUTPUT_HANDLE, STDOUT_FILENO, stdout); - // Explicitly don't forward stderr because some libraries like to write to it - // with no way to disable it (e.g., libmagic) - /* - reopenConsoleHandle(STD_ERROR_HANDLE, STDERR_FILENO, stderr); - */ - // Enable ANSI colors in the console log::impl::enableColorPrinting(); } else {