diff options
author | Zeev Suraski <zeev@php.net> | 2002-09-19 15:58:01 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2002-09-19 15:58:01 +0000 |
commit | bd115087e39a7dd3fbacc4a6ffb4e7b9c0dbf2b5 (patch) | |
tree | bb82ec4c1acfdc2ff5e18d99fda5387d512c10d2 /Zend | |
parent | 3ae3eb06e92d2ae5894e4e0365b755ba9923446c (diff) | |
download | php-git-bd115087e39a7dd3fbacc4a6ffb4e7b9c0dbf2b5.tar.gz |
MFZE1 - connection_status() fix
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend.c | 3 | ||||
-rw-r--r-- | Zend/zend.h | 2 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index c47d1e223d..3a655f4ce9 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -52,6 +52,8 @@ ZEND_API void (*zend_unblock_interruptions)(void); 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 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions, i 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; diff --git a/Zend/zend.h b/Zend/zend.h index ed1beb0637..4901f468ac 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -337,6 +337,7 @@ typedef struct _zend_utility_functions { 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_block_interruptions)(void); 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, ...); diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 5b452d6e3f..e3903e291b 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -836,11 +836,11 @@ ZEND_API void zend_timeout(int dummy) { 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); + } } |