summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2017-01-23 16:55:43 +0000
committerJoe Watkins <krakjoe@php.net>2017-01-23 16:56:08 +0000
commit9aad38038e8bd41b9bf89c00804943509e10fe1a (patch)
tree8e51c93b5cd877bec09b4d23341237a2fa97bdd8
parent9d7054693ec2cb81b5e061a6c9efbda4f9c9d410 (diff)
parent80a851b4dd622f5825e46a7318bdd80123205b02 (diff)
downloadphp-git-9aad38038e8bd41b9bf89c00804943509e10fe1a.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix Bug #69865 php-fpm does not close stderr when using syslog
-rw-r--r--NEWS4
-rw-r--r--sapi/fpm/fpm/fpm_stdio.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 488e990b72..425a90e2a4 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,10 @@ PHP NEWS
. Fixed bug #73904 (php-cgi fails to load -c specified php.ini file). (Anatol)
. Fixed bug #72898 (PHP_FCGI_CHILDREN is not included in phpinfo()). (Anatol)
+- FPM:
+ . Fixed bug #69865 (php-fpm does not close stderr when using syslog).
+ (m6w6)
+
- GD:
. Fixed bug #73968 (Premature failing of XBM reading). (cmb)
diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c
index e28c0cbe7f..40720176e1 100644
--- a/sapi/fpm/fpm/fpm_stdio.c
+++ b/sapi/fpm/fpm/fpm_stdio.c
@@ -73,6 +73,12 @@ int fpm_stdio_init_final() /* {{{ */
return -1;
}
}
+#ifdef HAVE_SYSLOG_H
+ else if (fpm_globals.error_log_fd == ZLOG_SYSLOG) {
+ /* dup to /dev/null when using syslog */
+ dup2(STDOUT_FILENO, STDERR_FILENO);
+ }
+#endif
}
zlog_set_launched();
return 0;