diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fd529359..0c561d93b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Bugfixes: * Detect BSSID instead of Wifi MAC address to align with other platforms (Wifi, macOS) * Remove support of used GPU memory detection, which is not reliable and only supported with `--gpu-force-vulkan`. (GPU) * Fix flag `--brightness-ddcci-sleep` (Brightness, Linux) +* Fix hanging if a child process prints to both stdout and stderr (Linux) Logos: * Add Black Mesa diff --git a/src/common/processing_linux.c b/src/common/processing_linux.c index b96a2ff85..81bf2eda2 100644 --- a/src/common/processing_linux.c +++ b/src/common/processing_linux.c @@ -34,10 +34,11 @@ const char* ffProcessAppendOutput(FFstrbuf* buffer, char* const argv[], bool use //Child if(childPid == 0) { + int nullFile = open("/dev/null", O_WRONLY); dup2(pipes[1], useStdErr ? STDERR_FILENO : STDOUT_FILENO); + dup2(nullFile, useStdErr ? STDOUT_FILENO : STDERR_FILENO); close(pipes[0]); close(pipes[1]); - close(useStdErr ? STDOUT_FILENO : STDERR_FILENO); setenv("LANG", "C", 1); execvp(argv[0], argv); exit(901);