summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi')
-rw-r--r--sapi/fpm/fpm/fpm_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index a1862b559d..1ce4cda0d5 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -1919,8 +1919,10 @@ fastcgi_request_done:
out:
SG(server_context) = NULL;
- php_module_shutdown(TSRMLS_C);
- sapi_shutdown();
+ if (parent) {
+ php_module_shutdown(TSRMLS_C);
+ sapi_shutdown();
+ }
#ifdef ZTS
tsrm_shutdown();