summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Nosek <root@localdomain.pl>2008-06-10 18:43:58 +0200
committerGrzegorz Nosek <root@localdomain.pl>2008-06-10 18:43:58 +0200
commitd1810bfcbf9fc7015e55b19b04e357a775d92f59 (patch)
tree16feaaa42fc45e5f6a1477967de8630a67a2261e
parente56b2b351454f05a74765453ef13fc0ac7a2ff68 (diff)
downloadfcgiwrap-d1810bfcbf9fc7015e55b19b04e357a775d92f59.tar.xz
fcgiwrap-d1810bfcbf9fc7015e55b19b04e357a775d92f59.zip
Keep passing data from CGI to FastCGI even after a descriptor closes early
-rw-r--r--fcgiwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fcgiwrap.c b/fcgiwrap.c
index 8430bfa..40fa156 100644
--- a/fcgiwrap.c
+++ b/fcgiwrap.c
@@ -269,7 +269,7 @@ static void fcgi_pass(struct fcgi_context *fc)
return;
/* now pass CGI reply back */
- while (fc->fd_stdout >= 0 && fc->fd_stderr >= 0) {
+ while (fc->fd_stdout >= 0 || fc->fd_stderr >= 0) {
FD_ZERO(&rset);
if (fc->fd_stdout >= 0) FD_SET(fc->fd_stdout, &rset);
if (fc->fd_stderr >= 0) FD_SET(fc->fd_stderr, &rset);