From: Manoj Kasichainula Date: Tue, 30 Nov 1999 23:27:29 +0000 (+0000) Subject: Some compile fixes for the piped log code. It doesn't completely X-Git-Tag: 1.3.10~138 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c31d4dbf558c8bdfe00e4facb4345f1fe1fbaf8f;p=apache Some compile fixes for the piped log code. It doesn't completely completely compile, but it looks a little better. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84197 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/http_log.h b/include/http_log.h index f503a9f826..3dd10cc7ec 100644 --- a/include/http_log.h +++ b/include/http_log.h @@ -146,7 +146,7 @@ typedef struct piped_log { #ifndef NO_RELIABLE_PIPED_LOGS char *program; ap_proc_t *pid; - ap_file_t fds[2]; + ap_file_t *fds[2]; #else ap_file_t *write_f; #endif diff --git a/server/log.c b/server/log.c index 38959ef099..fef740b452 100644 --- a/server/log.c +++ b/server/log.c @@ -637,7 +637,7 @@ static int piped_log_spawn(piped_log *pl) #ifdef SIGHUP signal(SIGHUP, SIG_IGN); #endif - if ((ap_createprocattr_init(pl->p, &procattr) != APR_SUCCESS) || + if ((ap_createprocattr_init(&procattr, pl->p) != APR_SUCCESS) || (ap_setprocattr_dir(procattr, pl->program) != APR_SUCCESS) || (ap_set_childin(procattr, pl->fds[0], pl->fds[1]) != APR_SUCCESS)) { /* Something bad happened, give up and go away. */ @@ -653,7 +653,7 @@ static int piped_log_spawn(piped_log *pl) RAISE_SIGSTOP(PIPED_LOG_SPAWN); /* I am assuming that if ap_create_process was */ /* successful that the child is running. */ pl->pid = procnew; - ap_get_os_proc(&pid, &procnew); + ap_get_os_proc(&pid, procnew); ap_register_other_child(pid, piped_log_maintenance, pl, pl->fds[1]); } } @@ -705,7 +705,7 @@ static void piped_log_maintenance(int reason, void *data, ap_wait_t status) } -static void piped_log_cleanup(void *data) +static ap_status_t piped_log_cleanup(void *data) { piped_log *pl = data; @@ -715,15 +715,17 @@ static void piped_log_cleanup(void *data) ap_unregister_other_child(pl); ap_close(pl->fds[0]); ap_close(pl->fds[1]); + return APR_SUCCESS; } -static void piped_log_cleanup_for_exec(void *data) +static ap_status_t piped_log_cleanup_for_exec(void *data) { piped_log *pl = data; ap_close(pl->fds[0]); ap_close(pl->fds[1]); + return APR_SUCCESS; } @@ -735,7 +737,7 @@ API_EXPORT(piped_log *) ap_open_piped_log(ap_context_t *p, const char *program) pl->p = p; pl->program = ap_pstrdup(p, program); pl->pid = NULL; - if (ap_create_pipe(p, &pl->fds[0], &pl->fds[1]) != APR_SUCCESS) { + if (ap_create_pipe(&pl->fds[0], &pl->fds[1], p) != APR_SUCCESS) { int save_errno = errno; errno = save_errno; return NULL;