From: Ryan Bloom Date: Wed, 18 Oct 2000 06:09:10 +0000 (+0000) Subject: Fix piped logs in 2.0. This basically: X-Git-Tag: APACHE_2_0_ALPHA_8~328 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16a54f95b077ff4eba24e133d47f245d53bb5537;p=apache Fix piped logs in 2.0. This basically: 1) cleans up an annoying type that was getting in my way while I was trying to fix things. 2) Makes some of the allocations pcalloc instead of palloc 3) The arg array passed to create_process is a const *char *, not const *char []. PR: 6642 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86640 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/log.c b/server/log.c index fcf2acce49..5e5be7010f 100644 --- a/server/log.c +++ b/server/log.c @@ -198,7 +198,7 @@ static int log_child(apr_pool_t *p, const char *progname, apr_tokenize_to_argv(progname, &args, p); pname = apr_pstrdup(p, args[0]); - procnew = (apr_proc_t *) apr_palloc(p, sizeof(*procnew)); + procnew = (apr_proc_t *) apr_pcalloc(p, sizeof(*procnew)); rc = apr_create_process(procnew, pname, args, NULL, procattr, p); if (rc == APR_SUCCESS) { @@ -561,7 +561,7 @@ static int piped_log_spawn(piped_log *pl) { int rc; apr_procattr_t *procattr; - apr_proc_t *procnew; + apr_proc_t *procnew = NULL; apr_status_t status; #ifdef SIGHUP @@ -583,7 +583,7 @@ static int piped_log_spawn(piped_log *pl) apr_tokenize_to_argv(pl->program, &args, pl->p); pname = apr_pstrdup(pl->p, args[0]); - procnew = (apr_proc_t *) apr_palloc(pl->p, sizeof(*procnew)); + procnew = apr_pcalloc(pl->p, sizeof(apr_proc_t)); rc = apr_create_process(procnew, pname, args, NULL, procattr, pl->p); if (rc == APR_SUCCESS) {