]> granicus.if.org Git - apache/commitdiff
Subset of another, have piped_log_cleanup_for_exec handle
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 17 Jan 2002 18:13:51 +0000 (18:13 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 17 Jan 2002 18:13:51 +0000 (18:13 +0000)
  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

index a18f50c2219b20e43d2ca981c08191fbc56cebb3..521322e104ebf04941425631fb9ef760624c34a8 100644 (file)
@@ -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;