From: Remi Collet Date: Tue, 8 Jul 2014 06:29:24 +0000 (+0200) Subject: Fix Bug #67530 error_log=syslog ignored X-Git-Tag: php-5.6.0RC3~1^2~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60fd4d445c4c6de25c8cb85bc52e9e17b90eecfe;p=php Fix Bug #67530 error_log=syslog ignored As for Bug #64915 Systemd use --nodaemonize but need to error_log to file or syslog to be honoured --- diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c index 33b0e01c87..303b32aede 100644 --- a/sapi/fpm/fpm/fpm_stdio.c +++ b/sapi/fpm/fpm/fpm_stdio.c @@ -268,7 +268,11 @@ int fpm_stdio_open_error_log(int reopen) /* {{{ */ if (!strcasecmp(fpm_global_config.error_log, "syslog")) { openlog(fpm_global_config.syslog_ident, LOG_PID | LOG_CONS, fpm_global_config.syslog_facility); fpm_globals.error_log_fd = ZLOG_SYSLOG; +#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); } return 0;