From c5d85f64395d3e6d2dbbe9604a2c597843567563 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Mon, 17 Nov 2014 11:45:29 +0000 Subject: 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 --- server/mpm/prefork/prefork.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'server/mpm/prefork/prefork.c') 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"); -- cgit v1.2.3