]> granicus.if.org Git - apache/commitdiff
mod_ext_filter: Prevent a hang on Windows when the filter
authorEric Covener <covener@apache.org>
Wed, 3 Oct 2007 17:17:24 +0000 (17:17 +0000)
committerEric Covener <covener@apache.org>
Wed, 3 Oct 2007 17:17:24 +0000 (17:17 +0000)
input data is pipelined
PR 29901

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@581660 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_ext_filter.c

diff --git a/CHANGES b/CHANGES
index 76e732d01a5530636ec7901d8eb7601c55d7c35e..5aa1d332a6b9feb36a7f20ad801f49fdb0253c93 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_ext_filter: Prevent a hang on Windows when the filter
+     input data is pipelined. 
+     PR 29901 [Eric Covener]
+
   *) mod_deflate: Don't leave a strong ETag in place while transforming
      the entity.
      PR 39727 [Nick Kew]
index 78c9f90d5efd2a284ad93457f927b0b7b437c128..e328ee478006a919a2cdc20ea7d1ab5ce521445c 100644 (file)
@@ -485,6 +485,14 @@ static apr_status_t init_ext_filter_process(ap_filter_t *f)
         return rc;
     }
 
+    rc = apr_file_pipe_timeout_set(ctx->proc->out, 0);
+    if (rc != APR_SUCCESS) {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, f->r,
+                      "couldn't set child stdin pipe timeout to 0 for filter %s ",
+                      ctx->filter->name);
+        return rc;
+    }
+
     apr_pool_note_subprocess(ctx->p, ctx->proc, APR_KILL_AFTER_TIMEOUT);
 
     /* We don't want the handle to the child's stdin inherited by any