From d1f7e439c6103f3e635beb221718eb09241c6fdb Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 3 Apr 2023 19:11:54 +0200 Subject: [PATCH] core: fix setting non-blocking stderr in nm_utils_spawn_helper() Fixes: d65702803cb0 ('core: print stderr from nm-daemon-helper') --- src/core/nm-core-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/nm-core-utils.c b/src/core/nm-core-utils.c index 410fb2bc29..175a1652e2 100644 --- a/src/core/nm-core-utils.c +++ b/src/core/nm-core-utils.c @@ -5167,7 +5167,7 @@ nm_utils_spawn_helper(const char *const *args, fcntl(info->child_stdin, F_SETFL, fd_flags | O_NONBLOCK); fd_flags = fcntl(info->child_stdout, F_GETFL, 0); fcntl(info->child_stdout, F_SETFL, fd_flags | O_NONBLOCK); - fd_flags = fcntl(info->child_stderr, F_GETFD, 0); + fd_flags = fcntl(info->child_stderr, F_GETFL, 0); fcntl(info->child_stderr, F_SETFL, fd_flags | O_NONBLOCK); /* Watch process stdin */