summaryrefslogtreecommitdiffstats
path: root/server/log.c
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2009-05-15 22:53:33 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2009-05-15 22:53:33 +0200
commit9a84fd27d600cdc87b1f77fd540d42e79477a246 (patch)
treed6aecbc80a480a87b8cfe8b3af4cacad69138d5a /server/log.c
parentEase migration for the hosts of piped loggers out there, handle the (diff)
downloadapache2-9a84fd27d600cdc87b1f77fd540d42e79477a246.tar.xz
apache2-9a84fd27d600cdc87b1f77fd540d42e79477a246.zip
Force the current directory to the server root in the invocation of the piped
logger processes. Looking for confirmation from Rainer that this resolves the ambiguity he observed in Message-ID: <4A0C9430.2090404@kippdata.de>. Note that the shell may decide to ignore the chdir, so test with "|$cmd" syntax to compare to the expected behavior from 5/14 or earlier. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@775327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/log.c')
-rw-r--r--server/log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/log.c b/server/log.c
index 2c34f316b9..cb5b3f98c6 100644
--- a/server/log.c
+++ b/server/log.c
@@ -309,6 +309,8 @@ static int log_child(apr_pool_t *p, const char *progname,
apr_file_t *errfile;
if (((rc = apr_procattr_create(&procattr, p)) == APR_SUCCESS)
+ && ((rc = apr_procattr_dir_set(procattr,
+ ap_server_root)) == APR_SUCCESS)
&& ((rc = apr_procattr_cmdtype_set(procattr, cmdtype)) == APR_SUCCESS)
&& ((rc = apr_procattr_io_set(procattr,
APR_FULL_BLOCK,
@@ -912,6 +914,8 @@ static apr_status_t piped_log_spawn(piped_log *pl)
apr_status_t status;
if (((status = apr_procattr_create(&procattr, pl->p)) != APR_SUCCESS) ||
+ ((status = apr_procattr_dir_set(procattr, ap_server_root))
+ != APR_SUCCESS) ||
((status = apr_procattr_cmdtype_set(procattr, pl->cmdtype))
!= APR_SUCCESS) ||
((status = apr_procattr_child_in_set(procattr,