Skip to content

Commit

Permalink
Avoid code duplication and don't miss env restore
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Oct 3, 2018
1 parent b0547a3 commit 044eb39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sapi/cgi/cgi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2242,8 +2242,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);

Expand Down Expand Up @@ -2299,6 +2298,7 @@ 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);

Expand Down

0 comments on commit 044eb39

Please sign in to comment.