From: Jeff Trawick Date: Wed, 23 Jun 2004 12:32:22 +0000 (+0000) Subject: start piped loggers via the shell, passing through the environment variables X-Git-Tag: pre_ajp_proxy~137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ef3a9aa2b3f9e6f6d2bb14bfd8381deae20be33;p=apache start piped loggers via the shell, passing through the environment variables in the httpd process this requires a new APR feature (APR_SHELLCMD_ENV), just added to apr 1.0-dev git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104019 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index a29f59ea83..fce7c86ffe 100644 --- a/CHANGES +++ b/CHANGES @@ -40,8 +40,9 @@ Changes with Apache 2.1.0-dev *) Fix bug in mod_deflate that unconditionally sent deflate'd output even when Accept-Encoding is not present. [Justin Erenkrantz] - *) Pass environment variables through to piped loggers, resolving - a regression since 1.3. [Ken Coar, Jeff Trawick] + *) Pass environment variables through to piped loggers and start + them via the shell, resolving regressions since 1.3. PR 28815 + [Ken Coar, Jeff Trawick] *) Enable the option to support anonymous shared memory in mod_ldap. This makes the cache work on Linux again. [Graham Leggett] diff --git a/server/log.c b/server/log.c index d4f1b54ad6..f8c2af4204 100644 --- a/server/log.c +++ b/server/log.c @@ -198,7 +198,7 @@ static int log_child(apr_pool_t *p, const char *progname, if (((rc = apr_procattr_create(&procattr, p)) == APR_SUCCESS) && ((rc = apr_procattr_cmdtype_set(procattr, - APR_PROGRAM_ENV)) == APR_SUCCESS) + APR_SHELLCMD_ENV)) == APR_SUCCESS) && ((rc = apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_NO_PIPE, @@ -725,7 +725,7 @@ static int piped_log_spawn(piped_log *pl) if (((status = apr_procattr_create(&procattr, pl->p)) != APR_SUCCESS) || ((status = apr_procattr_cmdtype_set(procattr, - APR_PROGRAM_ENV)) != APR_SUCCESS) || + APR_SHELLCMD_ENV)) != APR_SUCCESS) || ((status = apr_procattr_child_in_set(procattr, ap_piped_log_read_fd(pl), ap_piped_log_write_fd(pl)))