diff options
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | locks/unix/proc_mutex.c | 3 |
2 files changed, 9 insertions, 0 deletions
@@ -1,5 +1,11 @@ Changes with APR 0.9.4 + *) Don't require the lock file name to be passed into + apr_proc_mutex_child_init() or apr_global_mutex_child_init(). + This allows child init to work when the lock file was a temp + file created by APR. (The problem only occurred with flock- + based mutexes.) [Jeff Trawick] + *) When using a temporary file for flock- and fcntl-based mutexes, don't let the file be deleted on close. For flock-based mutexes, this corrects a fatal problem, since the file would disappear diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c index 1ad35de4a..2f2a1a626 100644 --- a/locks/unix/proc_mutex.c +++ b/locks/unix/proc_mutex.c @@ -682,6 +682,9 @@ static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex, memcpy(new_mutex, *mutex, sizeof *new_mutex); new_mutex->pool = pool; + if (!fname) { + fname = (*mutex)->fname; + } new_mutex->fname = apr_pstrdup(pool, fname); rv = apr_file_open(&new_mutex->interproc, new_mutex->fname, APR_WRITE, 0, new_mutex->pool); |