com php-src: Fixed Bug #64915 (error_log ignored when daemonize=0): NEWS sapi/fpm/fpm/fpm_stdio.c
| From: | Remi Collet | Date: | Fri, 24 May 2013 10:09:05 +0000 |
| Subject: | com php-src: Fixed Bug #64915 (error_log ignored when daemonize=0): NEWS sapi/fpm/fpm/fpm_stdio.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72239@lists.php.net to get a copy of this message | ||
Commit: 9f6ca9bc6400fc9c8eaebf963f6eb048dde4b34f
Author: Remi Collet <remi@php.net> Fri, 24 May 2013 12:09:05 +0200
Parents: cd74b7d57e8246a47c74b979c41a6fa0b56719b7
Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9f6ca9bc6400fc9c8eaebf963f6eb048dde4b34f
Log:
Fixed Bug #64915 (error_log ignored when daemonize=0)
Use configured error_log file when stderr is not a tty.
So only use tty during interactive debug run.
Bugs:
https://bugs.php.net/64915
Changed paths:
M NEWS
M sapi/fpm/fpm/fpm_stdio.c
Diff:
diff --git a/NEWS b/NEWS
index c6042f7...3261877 100644
--- 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:
diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c
index 10b867d..d81e101 100644
--- a/sapi/fpm/fpm/fpm_stdio.c
+++ b/sapi/fpm/fpm/fpm_stdio.c
@@ -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);
}
}