diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-10-03 17:43:08 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-10-03 17:43:08 +0300 |
commit | ba3d0a845a697c25fa2fba1e750332813f4ef85c (patch) | |
tree | cabde8e9d04582cd60b9c0901c34e84e14696f0e | |
parent | ed5fb80c31ccfebf99b4b2dc7a51a54d4623c193 (diff) | |
parent | 1c11fc7f135fbcba7172acae28284d1a873b2bc7 (diff) | |
download | php-git-ba3d0a845a697c25fa2fba1e750332813f4ef85c.tar.gz |
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
Avoid code duplication and don't miss env restore
-rw-r--r-- | sapi/cgi/cgi_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index ddef5e25f7..98981c0ae3 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -2191,8 +2191,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); @@ -2249,7 +2248,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); |