Skip to content

Commit 80a851b

Browse files
m6w6krakjoe
authored andcommitted
Fix Bug #69865 php-fpm does not close stderr when using syslog
1 parent d636467 commit 80a851b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ PHP NEWS
1515
- FPM:
1616
. Fixed bug #67583 (double fastcgi_end_request on max_children limit).
1717
(Dmitry Saprykin)
18+
. Fixed bug #69865 (php-fpm does not close stderr when using syslog).
19+
(m6w6)
1820

1921
- GD:
2022
. Fixed bug #73968 (Premature failing of XBM reading). (cmb)

sapi/fpm/fpm/fpm_stdio.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ int fpm_stdio_init_final() /* {{{ */
7373
return -1;
7474
}
7575
}
76+
#ifdef HAVE_SYSLOG_H
77+
else if (fpm_globals.error_log_fd == ZLOG_SYSLOG) {
78+
/* dup to /dev/null when using syslog */
79+
dup2(STDOUT_FILENO, STDERR_FILENO);
80+
}
81+
#endif
7682
}
7783
zlog_set_launched();
7884
return 0;

0 commit comments

Comments
 (0)