Fixed bug #40414 (possivle endless fork() loop when running fastcgi)

This commit is contained in:
Dmitry Stogov 2007-02-15 12:33:54 +00:00
parent 5ebba1b2f6
commit d57b78aab1
3 changed files with 10 additions and 0 deletions

View file

@ -1338,6 +1338,10 @@ consult the installation file that came with this distribution, or visit \n\
exit(1);
}
if (fcgi_in_shutdown()) {
exit(0);
}
while (parent) {
do {
#ifdef DEBUG_FASTCGI

View file

@ -164,6 +164,11 @@ static void fcgi_signal_handler(int signo)
#endif
int fcgi_in_shutdown(void)
{
return in_shutdown;
}
int fcgi_init(void)
{
if (!is_initialized) {

View file

@ -110,6 +110,7 @@ typedef struct _fcgi_request {
int fcgi_init(void);
int fcgi_is_fastcgi(void);
int fcgi_in_shutdown(void);
int fcgi_listen(const char *path, int backlog);
void fcgi_init_request(fcgi_request *req, int listen_socket);
int fcgi_accept_request(fcgi_request *req);