]> granicus.if.org Git - php/commitdiff
Revert "Remove a few unused write warning (backport from master, oops)s"
authorNikita Popov <nikic@php.net>
Sun, 20 Nov 2016 18:02:40 +0000 (19:02 +0100)
committerNikita Popov <nikic@php.net>
Sun, 20 Nov 2016 18:09:05 +0000 (19:09 +0100)
This reverts commit c65d24eaa3671e61db7c2a3f28daeaf7c74ac758.

Zend/zend_execute_API.c
Zend/zend_portability.h
sapi/fpm/fpm/fpm_log.c
sapi/fpm/fpm/fpm_main.c
sapi/fpm/fpm/fpm_signals.c
sapi/fpm/fpm/zlog.c
sapi/phpdbg/phpdbg.h
sapi/phpdbg/phpdbg_io.c

index 3f8025b648c6395c4c572320049c4a2f4e7bec0c..f96cac5f097603a45e1f4fdac03e40c07fa7d104 100644 (file)
@@ -1183,6 +1183,7 @@ ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name,
 
 ZEND_API void zend_timeout(int dummy) /* {{{ */
 {
+
        if (zend_on_timeout) {
 #ifdef ZEND_SIGNALS
                /*
index d299004ce42c99b67b005b3fec0a822fb628c022..f1871294166c47117e76da8b8ad06df4202fdbde 100644 (file)
 # define ZEND_IGNORE_VALUE(x) ((void) (x))
 #endif
 
-#define quiet_write(...) ZEND_IGNORE_VALUE(write(__VA_ARGS__))
-
 /* all HAVE_XXX test have to be after the include of zend_config above */
 
 #if defined(HAVE_LIBDL) && !defined(ZEND_WIN32)
index b74f47a340aeb790a4df18a8edfc16ba13f50ddc..5aad9a08c9e1738fe118226438f7c28eff031b0e 100644 (file)
@@ -467,7 +467,7 @@ int fpm_log_write(char *log_format) /* {{{ */
 
        if (!test && strlen(buffer) > 0) {
                buffer[len] = '\n';
-               quiet_write(fpm_log_fd, buffer, len + 1);
+               write(fpm_log_fd, buffer, len + 1);
        }
 
        return 0;
index 76b9298411deb6fc30c8c1c91bdeab4a17534ca6..5adeb63b7a18028a4e43654e429dbd3556dca237 100644 (file)
@@ -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]);
-                       quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval));
+                       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]);
-               quiet_write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval));
+               write(fpm_globals.send_config_pipe[1], &writeval, sizeof(writeval));
                close(fpm_globals.send_config_pipe[1]);
        }
        fpm_is_running = 1;
index f80de5d09f4591e379c517f9c205120691c8d8b3..a637e69e71949ff361765b0bead06682396dbb11 100644 (file)
@@ -174,7 +174,7 @@ static void sig_handler(int signo) /* {{{ */
 
        saved_errno = errno;
        s = sig_chars[signo];
-       quiet_write(sp[1], &s, sizeof(s));
+       write(sp[1], &s, sizeof(s));
        errno = saved_errno;
 }
 /* }}} */
index 1266be85e655a9ff943793c4b10735b4d4e80d97..1659c77efcaea2952af97708bf6d09522db13c55 100644 (file)
@@ -186,11 +186,11 @@ void vzlog(const char *function, int line, int flags, const char *fmt, va_list a
 #endif
        {
                buf[len++] = '\n';
-               quiet_write(zlog_fd > -1 ? zlog_fd : STDERR_FILENO, buf, len);
+               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) {
-               quiet_write(STDERR_FILENO, buf, len);
+               write(STDERR_FILENO, buf, len);
        }
 }
 /* }}} */
index 3df2be0aed51ef05554810b36f1328328bb18c8d..94c5471e22d8e4b35a5d310c51f7ef4a459de10f 100644 (file)
 #define memcpy(...) memcpy_tmp(__VA_ARGS__)
 #endif
 
+#define quiet_write(...) ZEND_IGNORE_VALUE(write(__VA_ARGS__))
+
 #if !defined(PHPDBG_WEBDATA_TRANSFER_H) && !defined(PHPDBG_WEBHELPER_H)
 
 #ifdef ZTS
index 69417e3d0b69eba7eb6f7425ee164b6df5edc06e..b2f4ba7c0d8ad5a51ee7ccec747323b53854246f 100644 (file)
@@ -203,7 +203,7 @@ static int phpdbg_output_pager(int sock, const char *ptr, int len) {
                        
                        if (memchr(p, '\n', endp - p)) {
                                char buf[PHPDBG_MAX_CMD];
-                               quiet_write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---"));
+                               write(sock, ZEND_STRL("\r---Type <return> to continue or q <return> to quit---"));
                                phpdbg_consume_stdin_line(buf);
                                if (*buf == 'q') {
                                        break;