You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ma...@hyperreal.org on 1999/12/01 00:27:41 UTC
cvs commit: apache-2.0/src/main http_log.c
manoj 99/11/30 15:27:39
Modified: src/include http_log.h
src/main http_log.c
Log:
Some compile fixes for the piped log code. It doesn't completely
completely compile, but it looks a little better.
Revision Changes Path
1.9 +1 -1 apache-2.0/src/include/http_log.h
Index: http_log.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/http_log.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -u -r1.8 -r1.9
--- http_log.h 1999/11/30 21:57:37 1.8
+++ http_log.h 1999/11/30 23:27:18 1.9
@@ -146,7 +146,7 @@
#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
1.18 +7 -5 apache-2.0/src/main/http_log.c
Index: http_log.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -u -r1.17 -r1.18
--- http_log.c 1999/11/18 23:07:18 1.17
+++ http_log.c 1999/11/30 23:27:29 1.18
@@ -637,7 +637,7 @@
#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 @@
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_cleanup(void *data)
+static ap_status_t piped_log_cleanup(void *data)
{
piped_log *pl = data;
@@ -715,15 +715,17 @@
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 @@
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;