summaryrefslogtreecommitdiff
path: root/sapi/cgi/cgi_main.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-10-03 14:35:38 +0200
committerAnatol Belski <ab@php.net>2018-10-03 14:35:38 +0200
commit8400f73f8dd7839910a6c823e795f7694a5cc6c1 (patch)
tree6f0f4ee858e813a72927d865043f32ae81d3bdc1 /sapi/cgi/cgi_main.c
parent726a77cfdd17cf0cbe9901a65ad3baea5a9b6ef8 (diff)
parentb8cfa09657aed6f616068d44aca5dc0b3295b8f6 (diff)
downloadphp-git-8400f73f8dd7839910a6c823e795f7694a5cc6c1.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Avoid code duplication and don't miss env restore
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r--sapi/cgi/cgi_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 9b06853a23..2174729eee 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -2187,8 +2187,7 @@ consult the installation file that came with this distribution, or visit \n\
while (parent) {
EnterCriticalSection(&cleanup_lock);
if (cleaning_up) {
- DeleteCriticalSection(&cleanup_lock);
- goto parent_out;
+ goto parent_loop_end;
}
LeaveCriticalSection(&cleanup_lock);
@@ -2243,7 +2242,8 @@ consult the installation file that came with this distribution, or visit \n\
WaitForMultipleObjects(kids, kid_cgi_ps, FALSE, INFINITE);
}
-
+
+parent_loop_end:
/* restore my env */
SetEnvironmentVariable("PHP_FCGI_CHILDREN", kid_buf);