From fe0338efa366a113bdf10090cc66b2be39e048e1 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Thu, 17 Jan 2002 18:13:51 +0000 Subject: [PATCH] Subset of another, have piped_log_cleanup_for_exec handle the dirtywork common to piped_log_cleanup git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92890 13f79535-47bb-0310-9956-ffa450edef68 --- server/log.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/server/log.c b/server/log.c index a18f50c221..521322e104 100644 --- a/server/log.c +++ b/server/log.c @@ -690,28 +690,27 @@ static void piped_log_maintenance(int reason, void *data, apr_wait_t status) } -static apr_status_t piped_log_cleanup(void *data) +static apr_status_t piped_log_cleanup_for_exec(void *data) { piped_log *pl = data; - if (pl->pid != NULL) { - apr_proc_kill(pl->pid, SIGTERM); - } apr_file_close(ap_piped_log_read_fd(pl)); apr_file_close(ap_piped_log_write_fd(pl)); return APR_SUCCESS; } -static apr_status_t piped_log_cleanup_for_exec(void *data) +static apr_status_t piped_log_cleanup(void *data) { piped_log *pl = data; - apr_file_close(ap_piped_log_read_fd(pl)); - apr_file_close(ap_piped_log_write_fd(pl)); - return APR_SUCCESS; + if (pl->pid != NULL) { + apr_proc_kill(pl->pid, SIGTERM); + } + return piped_log_cleanup_for_exec(data); } + AP_DECLARE(piped_log *) ap_open_piped_log(apr_pool_t *p, const char *program) { piped_log *pl; -- 2.50.1