mirror of https://github.com/Icinga/icinga2.git
Fix file descriptor leak in SetDaemonIO
This commit is contained in:
parent
7c31654552
commit
ac7a55cf56
|
@ -134,7 +134,7 @@ static bool SetDaemonIO(const String& stderrFile)
|
|||
if (fderr < 0 && errno == ENOENT)
|
||||
fderr = open(errPath, O_CREAT | O_WRONLY | O_APPEND, 0600);
|
||||
|
||||
if (fderr > 0) {
|
||||
if (fderr >= 0) {
|
||||
if (fderr != 2)
|
||||
dup2(fderr, 2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue