From 11c7605c0d5423f90f399f5e830d1095089f38a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20M=C3=B6llers?= <20593010+jmoellers@users.noreply.github.com> Date: Thu, 28 Jan 2021 15:13:30 +0100 Subject: [PATCH] helper: Fix stderr file descriptor The third file descriptor is STDERR_FILENO, not STDOUT_FILENO --- lib/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper.c b/lib/helper.c index 2b73b03..b547123 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -935,7 +935,7 @@ ipmi_start_daemon(struct ipmi_intf *intf) exit(1); } ret = dup(fd); - if (ret != STDOUT_FILENO) { + if (ret != STDERR_FILENO) { lprintf(LOG_ERR, "failed to reset stderr: %s (%d)", strerror(errno), errno); exit(1); }