]> granicus.if.org Git - apache/commitdiff
Add logic to timeout CGI scripts properly. This requires that APR pipes
authorRyan Bloom <rbb@apache.org>
Tue, 18 Apr 2000 00:08:30 +0000 (00:08 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 18 Apr 2000 00:08:30 +0000 (00:08 +0000)
can be timed out.

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

STATUS
modules/generators/mod_cgi.c

diff --git a/STATUS b/STATUS
index fd811d4d34458b713a696faf154216f25f796d3d..d5324266fb25351da15b48cbf8b10427f3873102 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 Apache 2.0 STATUS:
-Last modified at [$Date: 2000/04/17 19:17:20 $]
+Last modified at [$Date: 2000/04/18 00:08:29 $]
 
 Release:
 
@@ -36,10 +36,6 @@ RELEASE SHOWSTOPPERS:
        be moved out of the MPMs and into some common file (http_core.c?).
        Dean says presumably you mean an os-specific file?
 
-    * Pipes to CGI scripts are not being timed out
-        Status: code has been added to APR to support timing out pipes.
-                This needs to be used in Apache now.
-
     * Put back resource limit code
 
     * suEXEC doesn't work
index 57bc4fef6889d0a37576c6696492f12427a188b3..6f14a7ab2cf6aa4fb9e444d27c269c6197b7069d 100644 (file)
@@ -360,6 +360,7 @@ static ap_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **scr
                 return APR_EBADF;
             *script_in = ap_bcreate(p, B_RD);
             ap_bpush_iol(*script_in, iol);
+            ap_bsetopt(*script_in, BO_TIMEOUT, &r->server->timeout);
 
             /* Fill in BUFF structure for parents pipe to child's stdin */
             ap_get_childin(&file, procnew);
@@ -368,6 +369,7 @@ static ap_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **scr
                 return APR_EBADF;
             *script_out = ap_bcreate(p, B_WR);
             ap_bpush_iol(*script_out, iol);
+            ap_bsetopt(*script_out, BO_TIMEOUT, &r->server->timeout);
 
             /* Fill in BUFF structure for parents pipe to child's stderr */
             ap_get_childerr(&file, procnew);
@@ -376,6 +378,7 @@ static ap_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **scr
                 return APR_EBADF;
             *script_err = ap_bcreate(p, B_RD);
             ap_bpush_iol(*script_err, iol);
+            ap_bsetopt(*script_err, BO_TIMEOUT, &r->server->timeout);
         }
     }
     ap_unblock_alarms();