Changes with Apache 2.0.15-dev
+ *) Get rid of an inadvertent close of file descriptor 2 in
+ mod_mime_magic. [Greg Ames, Jeff Trawick]
+
*) Add a hook, create_request. This hook allows modules to modify
a request while it is being created. This hook is called for all
request_rec's, main request, sub request, and internal redirect.
int method;
};
-static int uncompress_child(struct uncompress_parms *parm, apr_pool_t *cntxt,
- apr_file_t **pipe_in)
+static int create_uncompress_child(struct uncompress_parms *parm, apr_pool_t *cntxt,
+ apr_file_t **pipe_in)
{
int rc = 1;
const char *new_argv[4];
apr_procattr_t *procattr;
apr_proc_t *procnew;
+ /* XXX missing 1.3 logic:
+ *
+ * what happens when !compr[parm->method].silent?
+ * Should we create the err pipe, read it, and copy to the log?
+ */
+
env = (const char *const *)ap_create_environment(child_context, r->subprocess_env);
if ((apr_procattr_create(&procattr, child_context) != APR_SUCCESS) ||
new_argv[2] = r->filename;
new_argv[3] = NULL;
- if (compr[parm->method].silent) {
- close(STDERR_FILENO);
- }
-
procnew = apr_pcalloc(child_context, sizeof(*procnew));
rc = apr_proc_create(procnew, compr[parm->method].argv[0],
new_argv, env, procattr, child_context);
if (apr_pool_create(&sub_context, r->pool) != APR_SUCCESS)
return -1;
- if ((rv = uncompress_child(&parm, sub_context, &pipe_out)) != APR_SUCCESS) {
+ if ((rv = create_uncompress_child(&parm, sub_context, &pipe_out)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
MODNAME ": couldn't spawn uncompress process: %s", r->uri);
return -1;