]> granicus.if.org Git - php/commitdiff
Fixed Bug #64915 (error_log ignored when daemonize=0)
authorRemi Collet <remi@php.net>
Fri, 24 May 2013 10:09:05 +0000 (12:09 +0200)
committerRemi Collet <remi@php.net>
Fri, 24 May 2013 10:09:05 +0000 (12:09 +0200)
Use configured error_log file when stderr is not a tty.
So only use tty during interactive debug run.

NEWS
sapi/fpm/fpm/fpm_stdio.c

diff --git a/NEWS b/NEWS
index c6042f7972e5594d029d73ee6763f8b4624e9989..32618771eb5fb9073bac5d61bd9e2526beb2a49d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2013, PHP 5.4.17
 
+- FPM:
+  . Fixed Bug #64915 (error_log ignored when daemonize=0). (Remi)
+
 ?? ??? 2013, PHP 5.4.16
 
 - Core:
index 10b867d00a414a0dcf964789a4ec8045446e9f56..d81e10150db6d49271963af6ecbc30e9382ad8b6 100644 (file)
@@ -291,7 +291,11 @@ int fpm_stdio_open_error_log(int reopen) /* {{{ */
                fd = fpm_globals.error_log_fd; /* for FD_CLOSEXEC to work */
        } else {
                fpm_globals.error_log_fd = fd;
+#if HAVE_UNISTD_H
+               if (fpm_global_config.daemonize || !isatty(STDERR_FILENO)) {
+#else
                if (fpm_global_config.daemonize) {
+#endif
                        zlog_set_fd(fpm_globals.error_log_fd);
                }
        }