diff options
author | Anatol Belski <ab@php.net> | 2013-10-17 10:40:43 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2013-10-17 10:40:43 +0200 |
commit | cf6ab0e915f95f01a8db1ce7daf70ed36cf49c66 (patch) | |
tree | c4fd681e0b62ad67d2b2ef9101c5e59cae8f0bc2 /Zend/zend.c | |
parent | e30b2aae5ad93405eee19bca6125ea872f409c82 (diff) | |
download | php-git-cf6ab0e915f95f01a8db1ce7daf70ed36cf49c66.tar.gz |
applied and fixed the original patch
initial work on the patch import done
Diffstat (limited to 'Zend/zend.c')
-rw-r--r-- | Zend/zend.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 11baf34c93..b98d264a3c 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -30,6 +30,7 @@ #include "zend_ini.h" #include "zend_vm.h" #include "zend_dtrace.h" +#include "zend_virtual_cwd.h" #ifdef ZTS # define GLOBAL_FUNCTION_TABLE global_function_table @@ -652,6 +653,8 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS start_memory_manager(TSRMLS_C); + virtual_cwd_startup(); /* Could use shutdown to free the main cwd but it would just slow it down for CGI */ + #if defined(__FreeBSD__) || defined(__DragonFly__) /* FreeBSD and DragonFly floating point precision fix */ fpsetmask(0); @@ -802,9 +805,14 @@ void zend_post_startup(TSRMLS_D) /* {{{ */ compiler_globals_ctor(compiler_globals, tsrm_ls); } free(EG(zend_constants)); + + virtual_cwd_deactivate(TSRMLS_C); + executor_globals_ctor(executor_globals, tsrm_ls); global_persistent_list = &EG(persistent_list); zend_copy_ini_directives(TSRMLS_C); +#else + virtual_cwd_deactivate(TSRMLS_C); #endif } /* }}} */ @@ -820,6 +828,9 @@ void zend_shutdown(TSRMLS_D) /* {{{ */ zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC); zend_destroy_modules(); + virtual_cwd_deactivate(TSRMLS_C); + virtual_cwd_shutdown(); + zend_hash_destroy(GLOBAL_FUNCTION_TABLE); zend_hash_destroy(GLOBAL_CLASS_TABLE); @@ -910,6 +921,7 @@ ZEND_API char *get_zend_version(void) /* {{{ */ void zend_activate(TSRMLS_D) /* {{{ */ { + virtual_cwd_activate(TSRMLS_C); gc_reset(TSRMLS_C); init_compiler(TSRMLS_C); init_executor(TSRMLS_C); |