dmitry          Thu Feb 15 12:33:16 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/sapi/cgi   cgi_main.c fastcgi.c fastcgi.h 
  Log:
  Fixed bug #40414 (possivle endless fork() loop when running fastcgi)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.540&r2=1.2027.2.547.2.541&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.540 php-src/NEWS:1.2027.2.547.2.541
--- php-src/NEWS:1.2027.2.547.2.540     Thu Feb 15 12:04:59 2007
+++ php-src/NEWS        Thu Feb 15 12:33:16 2007
@@ -13,6 +13,8 @@
 - Fixed bug #40451 (addAttribute() may crash when used with non-existent child 
   node). (Tony)
 - Fixed bug #40428 (imagepstext() doesn't accept optional parameter). (Pierre)
+- Fixed bug #40414 (possible endless fork() loop when running fastcgi).
+  (Dmitry)
 - Fixed bug #40410 (ext/posix does not compile on MacOS 10.3.9). (Tony)
 - Fixed Bug #40352 (FCGI_WEB_SERVER_ADDRS function get lost). (Dmitry)
 - Fixed bug #40236 (php -a function allocation eats memory). (Dmitry)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.21&r2=1.267.2.15.2.22&diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.21 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.22
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.21 Mon Jan 29 19:36:01 2007
+++ php-src/sapi/cgi/cgi_main.c Thu Feb 15 12:33:16 2007
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.21 2007/01/29 19:36:01 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.22 2007/02/15 12:33:16 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1392,6 +1392,10 @@
                        exit(1);
                }
 
+               if (fcgi_in_shutdown()) {
+                       exit(0);
+               }
+
                while (parent) {
                        do {
 #ifdef DEBUG_FASTCGI
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.15&r2=1.4.2.13.2.16&diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.15 
php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.16
--- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.15    Thu Feb 15 12:04:59 2007
+++ php-src/sapi/cgi/fastcgi.c  Thu Feb 15 12:33:16 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fastcgi.c,v 1.4.2.13.2.15 2007/02/15 12:04:59 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.16 2007/02/15 12:33:16 dmitry Exp $ */
 
 #include "php.h"
 #include "fastcgi.h"
@@ -164,6 +164,11 @@
 
 #endif
 
+int fcgi_in_shutdown(void)
+{
+       return in_shutdown;
+}
+
 int fcgi_init(void)
 {
        if (!is_initialized) {
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.h?r1=1.2.2.4.2.2&r2=1.2.2.4.2.3&diff_format=u
Index: php-src/sapi/cgi/fastcgi.h
diff -u php-src/sapi/cgi/fastcgi.h:1.2.2.4.2.2 
php-src/sapi/cgi/fastcgi.h:1.2.2.4.2.3
--- php-src/sapi/cgi/fastcgi.h:1.2.2.4.2.2      Mon Jan  1 09:36:12 2007
+++ php-src/sapi/cgi/fastcgi.h  Thu Feb 15 12:33:16 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: fastcgi.h,v 1.2.2.4.2.2 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: fastcgi.h,v 1.2.2.4.2.3 2007/02/15 12:33:16 dmitry Exp $ */
 
 /* FastCGI protocol */
 
@@ -110,6 +110,7 @@
 
 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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to