blob: 4a32fcff72abf9a99efd2ae9d4c2a1f753b8ae2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 9f6ca9bc6400fc9c8eaebf963f6eb048dde4b34f Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Fri, 24 May 2013 12:09:05 +0200
Subject: [PATCH] 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.
---
NEWS | 3 +++
sapi/fpm/fpm/fpm_stdio.c | 4 ++++
2 files changed, 7 insertions(+)
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);
}
}
--
1.7.11.5
|