summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArnaud Le Blanc <lbarnaud@php.net>2009-03-27 02:34:06 +0000
committerArnaud Le Blanc <lbarnaud@php.net>2009-03-27 02:34:06 +0000
commit843202cd5cd91bfc4a2898032355737ed6151fa1 (patch)
treea9bb6609a43c9dc4d70080ba7561314391f840fe /main
parent13061cf0a069ed4fd90959c2f3e0166a3fbdcf59 (diff)
downloadphp-git-843202cd5cd91bfc4a2898032355737ed6151fa1.tar.gz
MFH: Fixed initialization of tick functions list in ZTS
Diffstat (limited to 'main')
-rw-r--r--main/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/main.c b/main/main.c
index d98aafe4fd..dde90c1389 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1623,6 +1623,8 @@ static int php_body_write_wrapper(const char *str, uint str_length)
static void core_globals_ctor(php_core_globals *core_globals TSRMLS_DC)
{
memset(core_globals, 0, sizeof(*core_globals));
+
+ php_startup_ticks(TSRMLS_C);
}
/* }}} */
#endif
@@ -1643,6 +1645,8 @@ static void core_globals_dtor(php_core_globals *core_globals TSRMLS_DC)
if (core_globals->disable_classes) {
free(core_globals->disable_classes);
}
+
+ php_shutdown_ticks(TSRMLS_C);
}
/* }}} */
@@ -1783,6 +1787,8 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
#ifdef PHP_WIN32
ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor) php_win32_core_globals_ctor, (ts_allocate_dtor) php_win32_core_globals_dtor);
#endif
+#else
+ php_startup_ticks(TSRMLS_C);
#endif
gc_globals_ctor(TSRMLS_C);
@@ -1927,11 +1933,6 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
zend_set_utility_values(&zuv);
php_startup_sapi_content_types(TSRMLS_C);
- if (php_startup_ticks(TSRMLS_C) == FAILURE) {
- php_printf("Unable to start PHP ticks\n");
- return FAILURE;
- }
-
/* startup extensions staticly compiled in */
if (php_register_internal_extensions_func(TSRMLS_C) == FAILURE) {
php_printf("Unable to start builtin modules\n");
@@ -2032,7 +2033,6 @@ void php_module_shutdown(TSRMLS_D)
WSACleanup();
#endif
- php_shutdown_ticks(TSRMLS_C);
sapi_flush(TSRMLS_C);
zend_shutdown(TSRMLS_C);