summaryrefslogtreecommitdiffstats
path: root/server/mpm/prefork/prefork.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2014-11-17 12:45:29 +0100
committerYann Ylavic <ylavic@apache.org>2014-11-17 12:45:29 +0100
commitc5d85f64395d3e6d2dbbe9604a2c597843567563 (patch)
tree0e97259058026ea2527d4751c3c4011822cb07a6 /server/mpm/prefork/prefork.c
parentFollow up to r1640040: CHANGES entry. (diff)
downloadapache2-c5d85f64395d3e6d2dbbe9604a2c597843567563.tar.xz
apache2-c5d85f64395d3e6d2dbbe9604a2c597843567563.zip
mpm_worker, mpm_prefork: follow up to r1635521.
Use one dedicated accept mutex per listeners bucket. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm/prefork/prefork.c')
-rw-r--r--server/mpm/prefork/prefork.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
index daa8569cf2..ab78c49bd2 100644
--- a/server/mpm/prefork/prefork.c
+++ b/server/mpm/prefork/prefork.c
@@ -1281,6 +1281,7 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
int level_flags = 0;
ap_listen_rec **listen_buckets;
apr_status_t rv;
+ char id[16];
int i;
pconf = p;
@@ -1322,10 +1323,11 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
"could not open pipe-of-death");
return DONE;
}
- /* Initialize cross-process accept lock when safe accept is needed */
- if ((rv = SAFE_ACCEPT(ap_proc_mutex_create(&all_buckets[i].mutex, NULL,
- AP_ACCEPT_MUTEX_TYPE, NULL,
- s, pconf, 0)))) {
+ /* Initialize cross-process accept lock (safe accept is needed only) */
+ if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i", i),
+ ap_proc_mutex_create(&all_buckets[i].mutex,
+ NULL, AP_ACCEPT_MUTEX_TYPE,
+ id, s, pconf, 0))))) {
ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
(startup ? NULL : s),
"could not create accept mutex");