((status = apr_procattr_child_errfn_set(procattr, log_child_errfn))
!= APR_SUCCESS) ||
((status = apr_procattr_error_check_set(procattr, 1)) != APR_SUCCESS)) {
- char buf[120];
/* Something bad happened, give up and go away. */
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00103)
- "piped_log_spawn: unable to setup child process '%s': %s",
- pl->program, apr_strerror(status, buf, sizeof(buf)));
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, status, NULL, APLOGNO(00103)
+ "piped_log_spawn: unable to setup child process '%s'",
+ pl->program);
}
else {
char **args;
close_handle_in_child(pl->p, pl->read_fd);
}
else {
- char buf[120];
/* Something bad happened, give up and go away. */
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00104)
- "unable to start piped log program '%s': %s",
- pl->program, apr_strerror(status, buf, sizeof(buf)));
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, status, NULL, APLOGNO(00104)
+ "unable to start piped log program '%s'",
+ pl->program);
}
}
static void piped_log_maintenance(int reason, void *data, apr_wait_t status)
{
piped_log *pl = data;
- apr_status_t stats;
+ apr_status_t rv;
int mpm_state;
switch (reason) {
* tells other logic not to try to kill it
*/
apr_proc_other_child_unregister(pl);
- stats = ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state);
- if (stats != APR_SUCCESS) {
+ rv = ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state);
+ if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00105)
"can't query MPM state; not restarting "
"piped log program '%s'",
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00106)
"piped log program '%s' failed unexpectedly",
pl->program);
- if ((stats = piped_log_spawn(pl)) != APR_SUCCESS) {
+ if ((rv = piped_log_spawn(pl)) != APR_SUCCESS) {
/* what can we do? This could be the error log we're having
* problems opening up... */
- char buf[120];
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00107)
- "piped_log_maintenance: unable to respawn '%s': %s",
- pl->program, apr_strerror(stats, buf, sizeof(buf)));
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, rv, NULL, APLOGNO(00107)
+ "piped_log_maintenance: unable to respawn '%s'",
+ pl->program);
}
}
break;