static apr_status_t proc_mutex_flock_cleanup(void *mutex_) { apr_status_t status; apr_proc_mutex_t *mutex=mutex_; if (mutex->curr_locked == 1) { status = proc_mutex_flock_release(mutex); if (status != APR_SUCCESS) return status; } if (mutex->interproc) { /* if it was opened properly */ apr_file_close(mutex->interproc); } unlink(mutex->fname); return APR_SUCCESS; }
static apr_status_t proc_mutex_flock_cleanup(void *mutex_) { apr_status_t status = APR_SUCCESS; apr_proc_mutex_t *mutex=mutex_; if (mutex->curr_locked == 1) { status = proc_mutex_flock_release(mutex); if (status != APR_SUCCESS) return status; } if (mutex->interproc) { /* if it was opened properly */ status = apr_file_close(mutex->interproc); } if (!mutex->interproc_closing && mutex->os.crossproc != -1 && close(mutex->os.crossproc) == -1 && status == APR_SUCCESS) { status = errno; } if (mutex->fname) { unlink(mutex->fname); } return status; }