summaryrefslogtreecommitdiffstats
path: root/server/mpm/worker/worker.c
diff options
context:
space:
mode:
authorDavid Reid <dreid@apache.org>2001-12-25 03:30:53 +0100
committerDavid Reid <dreid@apache.org>2001-12-25 03:30:53 +0100
commit88b31284ffb4718bbb128744e9cd67121da3ef6b (patch)
tree269c3c385f86a5bb1a913b24bcc6f6f2243df33d /server/mpm/worker/worker.c
parentfix a horrible bug which caused scoreboard initialation to always exit (diff)
downloadapache2-88b31284ffb4718bbb128744e9cd67121da3ef6b.tar.xz
apache2-88b31284ffb4718bbb128744e9cd67121da3ef6b.zip
This allows platforms without the _NP locking palaver to build
the worker MPM. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92596 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--server/mpm/worker/worker.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c
index 5290528565..d9238ad7d6 100644
--- a/server/mpm/worker/worker.c
+++ b/server/mpm/worker/worker.c
@@ -1391,14 +1391,21 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
ap_lock_fname = apr_psprintf(_pconf, "%s.%" APR_OS_PROC_T_FMT,
ap_server_root_relative(_pconf, ap_lock_fname),
ap_my_pid);
+
+#if APR_HAS_CREATE_LOCKS_NP
rv = apr_proc_mutex_create_np(&accept_mutex, ap_lock_fname,
ap_accept_lock_mech, _pconf);
+#else
+ rv = apr_proc_mutex_create(&accept_mutex, ap_lock_fname, _pconf);
+#endif /* APR_HAS_CREATE_LOCKS_NP */
+
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
"Couldn't create accept lock");
return 1;
}
+#if APR_HAS_CREATE_LOCKS_NP
#if APR_USE_SYSVSEM_SERIALIZE
if (ap_accept_lock_mech == APR_LOCK_DEFAULT ||
ap_accept_lock_mech == APR_LOCK_SYSVSEM) {
@@ -1412,6 +1419,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
return 1;
}
}
+#endif /* APR_HAS_CREATE_LOCKS_NP */
if (!is_graceful) {
ap_run_pre_mpm(pconf, SB_SHARED);