mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Remove IOLs from Apache. They are no longer necessary, now that we have
filtering beginning to work. There is a hack that has been repeated through this patch, we morph a pipe into a socket, and put the socket into the BUFF. Everytime we do that, we are working with a pipe from a CGI, and we should be creating a pipe bucket and passing that bucket back. Because we don't actually have pipe buckets yet, we are using this hack. When we get pipe buckets, this will be fixed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86136 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -309,7 +309,7 @@ static apr_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **sc
|
||||
apr_proc_t *procnew = apr_pcalloc(p, sizeof(*procnew));
|
||||
apr_status_t rc = APR_SUCCESS;
|
||||
apr_file_t *file = NULL;
|
||||
ap_iol *iol;
|
||||
apr_file_t *sock = NULL;
|
||||
#if defined(RLIMIT_CPU) || defined(RLIMIT_NPROC) || \
|
||||
defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS)
|
||||
core_dir_config *conf;
|
||||
@@ -379,29 +379,42 @@ static apr_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **sc
|
||||
|
||||
/* Fill in BUFF structure for parents pipe to child's stdout */
|
||||
file = procnew->out;
|
||||
iol = ap_create_file_iol(file);
|
||||
if (!iol)
|
||||
if (!file)
|
||||
return APR_EBADF;
|
||||
/* XXX This is a hack. The correct solution is to create a
|
||||
* pipe bucket, and just pass it down. Since that bucket type
|
||||
* hasn't been written, we can hack it for the moment.
|
||||
*/
|
||||
apr_socket_from_file(&sock, file);
|
||||
|
||||
*script_in = ap_bcreate(p, B_RD);
|
||||
ap_bpush_iol(*script_in, iol);
|
||||
ap_bpush_socket(*script_in, sock);
|
||||
ap_bsetopt(*script_in, BO_TIMEOUT, &r->server->timeout);
|
||||
|
||||
/* Fill in BUFF structure for parents pipe to child's stdin */
|
||||
file = procnew->in;
|
||||
iol = ap_create_file_iol(file);
|
||||
if (!iol)
|
||||
if (!file)
|
||||
return APR_EBADF;
|
||||
/* XXX This is a hack. The correct solution is to create a
|
||||
* pipe bucket, and just pass it down. Since that bucket type
|
||||
* hasn't been written, we can hack it for the moment.
|
||||
*/
|
||||
apr_socket_from_file(&sock, file);
|
||||
*script_out = ap_bcreate(p, B_WR);
|
||||
ap_bpush_iol(*script_out, iol);
|
||||
ap_bpush_socket(*script_out, sock);
|
||||
ap_bsetopt(*script_out, BO_TIMEOUT, &r->server->timeout);
|
||||
|
||||
/* Fill in BUFF structure for parents pipe to child's stderr */
|
||||
file = procnew->err;
|
||||
iol = ap_create_file_iol(file);
|
||||
if (!iol)
|
||||
if (!file)
|
||||
return APR_EBADF;
|
||||
/* XXX This is a hack. The correct solution is to create a
|
||||
* pipe bucket, and just pass it down. Since that bucket type
|
||||
* hasn't been written, we can hack it for the moment.
|
||||
*/
|
||||
apr_socket_from_file(&sock, file);
|
||||
*script_err = ap_bcreate(p, B_RD);
|
||||
ap_bpush_iol(*script_err, iol);
|
||||
ap_bpush_socket(*script_err, sock);
|
||||
ap_bsetopt(*script_err, BO_TIMEOUT, &r->server->timeout);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user