diff options
| author | Remi Collet <remi@php.net> | 2013-05-24 12:09:05 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2013-05-24 12:09:05 +0200 |
| commit | 9f6ca9bc6400fc9c8eaebf963f6eb048dde4b34f (patch) | |
| tree | bb15b793a17c31cc5b5735f00d8c84e9cbae1fd5 /sapi | |
| parent | cd74b7d57e8246a47c74b979c41a6fa0b56719b7 (diff) | |
| download | php-git-9f6ca9bc6400fc9c8eaebf963f6eb048dde4b34f.tar.gz | |
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.
Diffstat (limited to 'sapi')
| -rw-r--r-- | sapi/fpm/fpm/fpm_stdio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c index 10b867d00a..d81e10150d 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); } } |
