Commit 076c7115 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Add logic to timeout CGI scripts properly. This requires that APR pipes

can be timed out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84986 13f79535-47bb-0310-9956-ffa450edef68
parent cae509f6
Loading
Loading
Loading
Loading
+1 −5
Changes for STATUS: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
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
+3 −0
Changes for modules/generators/mod_cgi.c: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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();