Lines 775-781
AP_DECLARE(void) ap_log_pid(apr_pool_t *
Link Here
|
775 |
static pid_t saved_pid = -1; |
775 |
static pid_t saved_pid = -1; |
776 |
pid_t mypid; |
776 |
pid_t mypid; |
777 |
apr_status_t rv; |
777 |
apr_status_t rv; |
778 |
const char *fname; |
778 |
const char *fname, *dname; |
779 |
|
779 |
|
780 |
if (!filename) { |
780 |
if (!filename) { |
781 |
return; |
781 |
return; |
Lines 804-809
AP_DECLARE(void) ap_log_pid(apr_pool_t *
Link Here
|
804 |
fname); |
804 |
fname); |
805 |
} |
805 |
} |
806 |
|
806 |
|
|
|
807 |
dname = apr_pstrndup(p, filename, (strrchr(filename, '/')+1)-filename); |
808 |
if (APR_SUCCESS != (rv = apr_dir_make_recursive(dname, |
809 |
APR_OS_DEFAULT, p))) { |
810 |
ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, |
811 |
"could not create pid directory: %s", |
812 |
dname); |
813 |
exit(1); |
814 |
} |
815 |
|
807 |
if ((rv = apr_file_open(&pid_file, fname, |
816 |
if ((rv = apr_file_open(&pid_file, fname, |
808 |
APR_WRITE | APR_CREATE | APR_TRUNCATE, |
817 |
APR_WRITE | APR_CREATE | APR_TRUNCATE, |
809 |
APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p)) |
818 |
APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p)) |