--- httpd-2.4.29.old/server/log.c +++ httpd-2.4.29.old/server/log.c @@ -1805,19 +1805,15 @@ break; case APR_OC_REASON_RESTART: - if (pl->pid != NULL) { - apr_proc_kill(pl->pid, SIGTERM); - pl->pid = NULL; - } + /* Avoid killing Pipe'd programs because when they see EOF during a graceful teardown, they will die off anyways */ break; - case APR_OC_REASON_UNREGISTER: break; } } -static apr_status_t piped_log_cleanup_for_exec(void *data) +static apr_status_t piped_log_cleanup(void *data) { piped_log *pl = data; @@ -1826,18 +1822,6 @@ return APR_SUCCESS; } - -static apr_status_t piped_log_cleanup(void *data) -{ - piped_log *pl = data; - - 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_ex(apr_pool_t *p, const char *program, apr_cmdtype_e cmdtype) @@ -1854,8 +1838,7 @@ APR_FULL_BLOCK, p) != APR_SUCCESS) { return NULL; } - apr_pool_cleanup_register(p, pl, piped_log_cleanup, - piped_log_cleanup_for_exec); + apr_pool_cleanup_register(p, pl, piped_log_cleanup, piped_log_cleanup); if (piped_log_spawn(pl) != APR_SUCCESS) { apr_pool_cleanup_kill(p, pl, piped_log_cleanup); apr_file_close(pl->read_fd);