Skip to content

Commit

Permalink
Use P_tmpdir rather than /tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
hummeltech committed Jul 10, 2024
1 parent e40839e commit 203266f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mod_tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,8 +1756,7 @@ static int mod_tile_post_config(apr_pool_t *pconf, apr_pool_t *plog,
* depending on OS and locking mechanism of choice, the file
* may or may not be actually created.
*/
mutexfilename = apr_psprintf(pconf, "/tmp/httpd_mutex.%ld",
(long int)getpid());
mutexfilename = apr_psprintf(pconf, "%s/httpd_mutex.%ld", P_tmpdir, (long int)getpid());

rs = apr_global_mutex_create(&stats_mutex, (const char *)mutexfilename,
APR_LOCK_DEFAULT, pconf);
Expand Down Expand Up @@ -1786,8 +1785,7 @@ static int mod_tile_post_config(apr_pool_t *pconf, apr_pool_t *plog,
* depending on OS and locking mechanism of choice, the file
* may or may not be actually created.
*/
mutexfilename = apr_psprintf(pconf, "/tmp/httpd_mutex_delay.%ld",
(long int)getpid());
mutexfilename = apr_psprintf(pconf, "%s/httpd_mutex_delay.%ld", P_tmpdir, (long int)getpid());

rs = apr_global_mutex_create(&delaypool_mutex, (const char *)mutexfilename,
APR_LOCK_DEFAULT, pconf);
Expand Down

0 comments on commit 203266f

Please sign in to comment.