From: William A. Rowe Jr Date: Fri, 15 May 2009 20:53:33 +0000 (+0000) Subject: Force the current directory to the server root in the invocation of the piped X-Git-Tag: 2.3.3~560 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a84fd27d600cdc87b1f77fd540d42e79477a246;p=apache 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 --- 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,