]> granicus.if.org Git - php/commitdiff
Suppress warnings using zend_quiet_write
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Apr 2019 10:22:52 +0000 (12:22 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 11 Apr 2019 10:22:52 +0000 (12:22 +0200)
Zend/zend_execute_API.c
sapi/phpdbg/phpdbg_io.c

index 56786ae41b5a5846e6be1312748aa4be6965cf22..ab1ef9fa4941b1c2b979f9cc4c956432c428c0cc 100644 (file)
@@ -1176,7 +1176,7 @@ static void zend_timeout_handler(int dummy) /* {{{ */
 
                output_len = snprintf(log_buffer, sizeof(log_buffer), "\nFatal error: Maximum execution time of " ZEND_LONG_FMT "+" ZEND_LONG_FMT " seconds exceeded (terminated) in %s on line %d\n", EG(timeout_seconds), EG(hard_timeout), error_filename, error_lineno);
                if (output_len > 0) {
-                       write(2, log_buffer, MIN(output_len, sizeof(log_buffer)));
+                       zend_quiet_write(2, log_buffer, MIN(output_len, sizeof(log_buffer)));
                }
                _exit(124);
     }
index 559ff12a60b276b55095e58dc84d79dcdaf426e0..6917daa9d96ea410b930dc21148fea3f047e88eb 100644 (file)
@@ -208,7 +208,7 @@ static int phpdbg_output_pager(int sock, const char *ptr, int len) {
                                if (*buf == 'q') {
                                        break;
                                }
-                               write(sock, "\r", 1);
+                               zend_quiet_write(sock, "\r", 1);
                        } else break;
                }
        }