]> granicus.if.org Git - php/commitdiff
Workaround to fix bug #74093 (Maximum execution time of n+2 seconds exceed not writte...
authorXinchen Hui <laruence@gmail.com>
Wed, 15 Feb 2017 04:27:56 +0000 (12:27 +0800)
committerXinchen Hui <laruence@gmail.com>
Wed, 15 Feb 2017 04:27:56 +0000 (12:27 +0800)
Use a different exit code for hard_timeout, 124 is used by linux
timeout:http://man7.org/linux/man-pages/man1/timeout.1.html
"If the command times out, and --preserve-status is not set, then exit with status 124"

NEWS
Zend/zend_execute_API.c

diff --git a/NEWS b/NEWS
index 4dfcf143434c2be0ab963d32ff483eda51534f6f..a5c22b1f72bc5372bfb551ffd8b226309c8bc925 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP                                                                        NEWS
 ?? ??? 2017, PHP 7.1.3
 
 - Core:
+  . Fixed bug #74093 (Maximum execution time of n+2 seconds exceed not written
+    in error_log). (Laruence)
   . Fixed bug #73989 (PHP 7.1 Segfaults within Symfony test suite).
     (Dmitry, Laruence)
   . Fixed bug #74084 (Out of bound read - zend_mm_alloc_small). (Laruence)
index 8f79881c0eb467433418211e31d6620c184cb5b9..e02198526fcf8c412c43238335830fd86ef0b648 100644 (file)
@@ -1203,7 +1203,7 @@ static void zend_timeout_handler(int dummy) /* {{{ */
                if (output_len > 0) {
                        write(2, log_buffer, MIN(output_len, sizeof(log_buffer)));
                }
-               _exit(1);
+               _exit(124);
     }
 #endif