summaryrefslogtreecommitdiffstats
path: root/php-bug77430.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-01-16 12:10:00 +0100
committerRemi Collet <remi@remirepo.net>2019-01-16 12:10:00 +0100
commit4544318feedf96cd11db14d08f14c74dde42fe00 (patch)
tree5c382d85ba35965f1466e66a25a729aec6804679 /php-bug77430.patch
parent6f25ba9a3d81cf9c0f33ee69eeaa64f5242fb070 (diff)
test build for https://bugs.php.net/77430
Diffstat (limited to 'php-bug77430.patch')
-rw-r--r--php-bug77430.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/php-bug77430.patch b/php-bug77430.patch
new file mode 100644
index 0000000..17c1ad1
--- /dev/null
+++ b/php-bug77430.patch
@@ -0,0 +1,36 @@
+diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c
+index ba8f6d8213..03d15cbf0d 100644
+--- a/sapi/fpm/fpm/fpm_stdio.c
++++ b/sapi/fpm/fpm/fpm_stdio.c
+@@ -122,7 +122,7 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg)
+ struct fpm_event_s *event;
+ int fifo_in = 1, fifo_out = 1;
+ int in_buf = 0;
+- int read_fail = 0, finish_log_stream = 0;
++ int read_fail = 0, finish_log_stream = 0, create_log_stream;
+ int res;
+ struct zlog_stream *log_stream;
+
+@@ -138,7 +138,8 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg)
+ event = &child->ev_stderr;
+ }
+
+- if (!child->log_stream) {
++ create_log_stream = !child->log_stream;
++ if (create_log_stream) {
+ log_stream = child->log_stream = malloc(sizeof(struct zlog_stream));
+ zlog_stream_init_ex(log_stream, ZLOG_WARNING, STDERR_FILENO);
+ zlog_stream_set_decorating(log_stream, child->wp->config->decorate_workers_output);
+@@ -196,8 +197,10 @@ static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg)
+ }
+
+ if (read_fail) {
+- zlog_stream_set_msg_suffix(log_stream, NULL, ", pipe is closed");
+- zlog_stream_finish(log_stream);
++ if (create_log_stream) {
++ zlog_stream_set_msg_suffix(log_stream, NULL, ", pipe is closed");
++ zlog_stream_finish(log_stream);
++ }
+ if (read_fail < 0) {
+ zlog(ZLOG_SYSERROR, "unable to read what child say");
+ }