diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2016-11-20 19:18:50 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2016-11-20 19:18:50 +0100 |
commit | bc30206b8ad4975126bd36f48add769d0d9a221a (patch) | |
tree | de9accd1aaa58cf9a25293cb9290bac1d6576a26 /sapi/fpm | |
parent | ff5a65d26b139142c5e967582c369ef65b79adf8 (diff) | |
download | php-git-bc30206b8ad4975126bd36f48add769d0d9a221a.tar.gz |
Revert "Revert "Remove a few unused write warning""
This reverts commit ff5a65d26b139142c5e967582c369ef65b79adf8.
(With zend_ prefix now)
Diffstat (limited to 'sapi/fpm')
-rw-r--r-- | sapi/fpm/fpm/fpm_log.c | 2 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_main.c | 4 | ||||
-rw-r--r-- | sapi/fpm/fpm/fpm_signals.c | 2 | ||||
-rw-r--r-- | sapi/fpm/fpm/zlog.c | 5 |
4 files changed, 7 insertions, 6 deletions
diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c index 5aad9a08c9..9f63d7a34c 100644 --- a/sapi/fpm/fpm/fpm_log.c +++ b/sapi/fpm/fpm/fpm_log.c @@ -467,7 +467,7 @@ int fpm_log_write(char *log_format) /* {{{ */ if (!test && strlen(buffer) > 0) { buffer[len] = '\n'; - write(fpm_log_fd, buffer, len + 1); + zend_quiet_write(fpm_log_fd, buffer, len + 1); } return 0; diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 5adeb63b7a..c0b4b1c754 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1865,7 +1865,7 @@ consult the installation file that came with this distribution, or visit \n\ if (fpm_globals.send_config_pipe[1]) { int writeval = 0; zlog(ZLOG_DEBUG, "Sending \"0\" (error) to parent via fd=%d", fpm_globals.send_config_pipe[1]); - write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval)); + zend_quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval)); close(fpm_globals.send_config_pipe[1]); } return FPM_EXIT_CONFIG; @@ -1874,7 +1874,7 @@ consult the installation file that came with this distribution, or visit \n\ if (fpm_globals.send_config_pipe[1]) { int writeval = 1; zlog(ZLOG_DEBUG, "Sending \"1\" (OK) to parent via fd=%d", fpm_globals.send_config_pipe[1]); - write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval)); + zend_quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval)); close(fpm_globals.send_config_pipe[1]); } fpm_is_running = 1; diff --git a/sapi/fpm/fpm/fpm_signals.c b/sapi/fpm/fpm/fpm_signals.c index a637e69e71..e9f49d9e47 100644 --- a/sapi/fpm/fpm/fpm_signals.c +++ b/sapi/fpm/fpm/fpm_signals.c @@ -174,7 +174,7 @@ static void sig_handler(int signo) /* {{{ */ saved_errno = errno; s = sig_chars[signo]; - write(sp[1], &s, sizeof(s)); + zend_quiet_write(sp[1], &s, sizeof(s)); errno = saved_errno; } /* }}} */ diff --git a/sapi/fpm/fpm/zlog.c b/sapi/fpm/fpm/zlog.c index 1659c77efc..4884dca856 100644 --- a/sapi/fpm/fpm/zlog.c +++ b/sapi/fpm/fpm/zlog.c @@ -16,6 +16,7 @@ #include "zlog.h" #include "fpm.h" +#include "zend_portability.h" #define MAX_LINE_LENGTH 1024 @@ -186,11 +187,11 @@ void vzlog(const char *function, int line, int flags, const char *fmt, va_list a #endif { buf[len++] = '\n'; - write(zlog_fd > -1 ? zlog_fd : STDERR_FILENO, buf, len); + zend_quiet_write(zlog_fd > -1 ? zlog_fd : STDERR_FILENO, buf, len); } if (zlog_fd != STDERR_FILENO && zlog_fd != -1 && !launched && (flags & ZLOG_LEVEL_MASK) >= ZLOG_NOTICE) { - write(STDERR_FILENO, buf, len); + zend_quiet_write(STDERR_FILENO, buf, len); } } /* }}} */ |