* In general, they're restored by persistent_compile_file(), but in case
* the script is aborted abnormally, they may become messed up.
*/
- TSRMLS_FETCH();
- efree(ZCG(cwd));
+ if (ZCG(cwd)) {
++ zend_string_release(ZCG(cwd));
+ ZCG(cwd) = NULL;
+ }
+
if (!ZCG(enabled) || !accel_startup_ok) {
return;
}
ZCG(counted) = 0;
#if !ZEND_DEBUG
- if (ZCG(accel_directives).fast_shutdown) {
- zend_accel_fast_shutdown(TSRMLS_C);
+ if (ZCG(accel_directives).fast_shutdown && is_zend_mm()) {
+ zend_accel_fast_shutdown();
}
#endif
-
- if (ZCG(cwd)) {
- zend_string_release(ZCG(cwd));
- ZCG(cwd) = NULL;
- }
-
}
static int accelerator_remove_cb(zend_extension *element1, zend_extension *element2)