helper: Fix stderr file descriptor

The third file descriptor is STDERR_FILENO, not STDOUT_FILENO
This commit is contained in:
Josef Möllers 2021-01-28 15:13:30 +01:00 committed by Alexander Amelkin
parent 5cf436056f
commit 11c7605c0d

View File

@ -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);
}