cvs: ZendEngine2 / zend.c zend.h zend_execute_API.c
| From: | Zeev Suraski | Date: | Thu, 19 Sep 2002 15:58:02 +0000 |
| Subject: | cvs: ZendEngine2 / zend.c zend.h zend_execute_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-442@lists.php.net to get a copy of this message | ||
zeev Thu Sep 19 11:58:02 2002 EDT
Modified files:
/ZendEngine2 zend.c zend.h zend_execute_API.c
Log:
MFZE1 - connection_status() fix
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.183 ZendEngine2/zend.c:1.184
--- ZendEngine2/zend.c:1.183 Thu Sep 19 11:15:39 2002
+++ ZendEngine2/zend.c Thu Sep 19 11:58:01 2002
@@ -52,6 +52,8 @@
ZEND_API void (*zend_ticks_function)(int ticks);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const
char *format, va_list args);
+void (*zend_on_timeout)(int seconds TSRMLS_DC);
+
static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents);
@@ -423,6 +425,7 @@
zend_unblock_interruptions = utility_functions->unblock_interruptions;
zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
zend_ticks_function = utility_functions->ticks_function;
+ zend_on_timeout = utility_functions->on_timeout;
zend_compile_file = compile_file;
zend_execute = execute;
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.183 ZendEngine2/zend.h:1.184
--- ZendEngine2/zend.h:1.183 Tue Sep 17 08:42:11 2002
+++ ZendEngine2/zend.h Thu Sep 19 11:58:01 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.183 2002/09/17 12:42:11 zeev Exp $ */
+/* $Id: zend.h,v 1.184 2002/09/19 15:58:01 zeev Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -337,6 +337,7 @@
void (*unblock_interruptions)(void);
int (*get_configuration_directive)(char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
+ void (*on_timeout)(int seconds TSRMLS_DC);
} zend_utility_functions;
@@ -465,6 +466,7 @@
extern ZEND_API void (*zend_unblock_interruptions)(void);
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint
error_lineno, const char *format, va_list args);
+extern void (*zend_on_timeout)(int seconds TSRMLS_DC);
ZEND_API void zend_error(int type, const char *format, ...);
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.177 ZendEngine2/zend_execute_API.c:1.178
--- ZendEngine2/zend_execute_API.c:1.177 Sun Sep 15 21:34:14 2002
+++ ZendEngine2/zend_execute_API.c Thu Sep 19 11:58:01 2002
@@ -836,11 +836,11 @@
{
TSRMLS_FETCH();
- /* is there any point in this? we're terminating the request anyway...
- PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
- */
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
+ if (zend_on_timeout) {
+ zend_on_timeout(EG(timeout_seconds) TSRMLS_CC);
+ }
}