diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-02-16 11:30:03 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-02-16 11:30:03 +0000 |
commit | 780c66d14babfbdfd3bcbf4d3db301ae445e90ee (patch) | |
tree | 5f6e7c6cd230e5e41b43b918e35eb3317a0e09b5 /sapi/cgi/cgi_main.c | |
parent | 9208d250c26df6e1717871b4e5ede5b0e9fb2b67 (diff) | |
download | php-git-780c66d14babfbdfd3bcbf4d3db301ae445e90ee.tar.gz |
Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill children when parent is killed)
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r-- | sapi/cgi/cgi_main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index f8375fd3c4..6db3673847 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -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); } |