diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2003-06-07 12:37:48 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2003-06-07 12:37:48 +0000 |
commit | 41fe3b39aa4eb8869d3701e9411784d633ea2907 (patch) | |
tree | 18b017b3a8bed1160a284ec379b9f8af10700fc3 /locks | |
parent | 59957e9680ffe140dde6a7d301d250e659c6a109 (diff) | |
download | libapr-41fe3b39aa4eb8869d3701e9411784d633ea2907.tar.gz |
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.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64530 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r-- | locks/unix/proc_mutex.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |