]> granicus.if.org Git - php/commitdiff
Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when parent...
authorDmitry Stogov <dmitry@php.net>
Fri, 16 Feb 2007 11:30:03 +0000 (11:30 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 16 Feb 2007 11:30:03 +0000 (11:30 +0000)
NEWS
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index e73da6fc4d7dd3f3cc0cfc2ebe6353903c3c9f09..b8ea683eca88be35b785ba41c4ef1d1014d4ddd3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ PHP                                                                        NEWS
   (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)
index f8375fd3c4d2f21e43f1b6e3ce9adf60095628d8..6db36738476c0ad4f9cd9ca6700be63754c74766 100644 (file)
@@ -355,18 +355,14 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
 
 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);
                }