mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00
Fixed bug #36158 (SIGTERM is not handled correctly when running as a FastCGI server)
This commit is contained in:
parent
52232a7f7a
commit
aa1142eded
3 changed files with 14 additions and 4 deletions
|
@ -274,7 +274,7 @@ static void sapi_cgibin_flush(void *server_context)
|
|||
#ifndef PHP_WIN32
|
||||
!parent &&
|
||||
#endif
|
||||
(!request || FCGX_FFlush(request->out) == -1)) {
|
||||
request && FCGX_FFlush(request->out) == -1) {
|
||||
php_handle_aborted_connection();
|
||||
}
|
||||
return;
|
||||
|
@ -1242,7 +1242,8 @@ consult the installation file that came with this distribution, or visit \n\
|
|||
#ifdef DEBUG_FASTCGI
|
||||
fprintf(stderr, "Wait for kids, pid %d\n", getpid());
|
||||
#endif
|
||||
wait(&status);
|
||||
while (wait(&status) < 0) {
|
||||
}
|
||||
running--;
|
||||
}
|
||||
}
|
||||
|
@ -1656,6 +1657,7 @@ fastcgi_request_done:
|
|||
exit_status = 255;
|
||||
} zend_end_try();
|
||||
|
||||
SG(server_context) = NULL;
|
||||
php_module_shutdown(TSRMLS_C);
|
||||
sapi_shutdown();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue