dmitry          Fri Feb 16 11:30:03 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    NEWS 
    /php-src/sapi/cgi   cgi_main.c 
  Log:
  Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when 
parent is killed)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.544&r2=1.2027.2.547.2.545&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.544 php-src/NEWS:1.2027.2.547.2.545
--- php-src/NEWS:1.2027.2.547.2.544     Fri Feb 16 08:33:28 2007
+++ php-src/NEWS        Fri Feb 16 11:30:03 2007
@@ -22,6 +22,8 @@
   (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 #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when
+  parent is killed). (Dmitry)
 - Fixed bug #40236 (php -a function allocation eats memory). (Dmitry)
 - Fixed bug #40109 (iptcembed fails on non-jfif jpegs). (Tony)
 - Fixed bug #39836 (SplObjectStorage empty after unserialize). (Marcus)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.22&r2=1.267.2.15.2.23&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.22 
php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.23
--- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.22 Thu Feb 15 12:33:16 2007
+++ php-src/sapi/cgi/cgi_main.c Fri Feb 16 11:30:03 2007
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.15.2.22 2007/02/15 12:33:16 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.15.2.23 2007/02/16 11:30:03 dmitry Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -355,18 +355,14 @@
 
 static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
 {
-       uint read_bytes=0, tmp_read_bytes;
-#if PHP_FASTCGI
-       char *pos = buffer;
-#endif
+       int read_bytes=0, tmp_read_bytes;
 
        count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - 
SG(read_post_bytes));
        while (read_bytes < count_bytes) {
 #if PHP_FASTCGI
                if (fcgi_is_fastcgi()) {
                        fcgi_request *request = (fcgi_request*) 
SG(server_context);
-                       tmp_read_bytes = fcgi_read(request, pos, count_bytes - 
read_bytes);
-                       pos += tmp_read_bytes;
+                       tmp_read_bytes = fcgi_read(request, buffer + 
read_bytes, count_bytes - read_bytes);
                } else {
                        tmp_read_bytes = read(0, buffer + read_bytes, 
count_bytes - read_bytes);
                }

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

Reply via email to