cvs: Zend / zend.c zend.h zend_execute_API.c
| From: | Zeev Suraski | Date: | Thu, 19 Sep 2002 15:54:10 +0000 |
| Subject: | cvs: Zend / zend.c zend.h zend_execute_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-441@lists.php.net to get a copy of this message | ||
zeev Thu Sep 19 11:54:10 2002 EDT
Modified files:
/Zend zend.c zend.h zend_execute_API.c
Log:
Fix connection_status()
Index: Zend/zend.c
diff -u Zend/zend.c:1.155 Zend/zend.c:1.156
--- Zend/zend.c:1.155 Tue Sep 17 05:06:07 2002
+++ Zend/zend.c Thu Sep 19 11:54:10 2002
@@ -53,6 +53,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);
@@ -414,6 +416,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: Zend/zend.h
diff -u Zend/zend.h:1.160 Zend/zend.h:1.161
--- Zend/zend.h:1.160 Tue Sep 17 05:06:07 2002
+++ Zend/zend.h Thu Sep 19 11:54:10 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.160 2002/09/17 09:06:07 zeev Exp $ */
+/* $Id: zend.h,v 1.161 2002/09/19 15:54:10 zeev Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -289,6 +289,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;
@@ -417,6 +418,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: Zend/zend_execute_API.c
diff -u Zend/zend_execute_API.c:1.150 Zend/zend_execute_API.c:1.151
--- Zend/zend_execute_API.c:1.150 Thu Sep 12 13:11:50 2002
+++ Zend/zend_execute_API.c Thu Sep 19 11:54:10 2002
@@ -711,12 +711,11 @@
{
TSRMLS_FETCH();
- /* We do need to set this here somehow in order for connection_status() to work
- * as documented in a register_shutdown_function
- 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);
+ }
}