summaryrefslogtreecommitdiffstats
path: root/server/mpm/prefork/prefork.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2000-12-01 18:41:26 +0100
committerJeff Trawick <trawick@apache.org>2000-12-01 18:41:26 +0100
commitdafb8da82679dcc61601d2702b0e4f1846da8101 (patch)
treea054d91d874f2e642d9016588ba06c38ff444526 /server/mpm/prefork/prefork.c
parentAdd "-D PROCESS_LOCK_IS_GLOBAL" to the httpd -V output when (diff)
downloadapache2-dafb8da82679dcc61601d2702b0e4f1846da8101.tar.xz
apache2-dafb8da82679dcc61601d2702b0e4f1846da8101.zip
If apr_lock() or apr_unlock() fail, write a log message before bailing
out. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87146 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--server/mpm/prefork/prefork.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
index 6bee0821c6..0ee89c94f1 100644
--- a/server/mpm/prefork/prefork.c
+++ b/server/mpm/prefork/prefork.c
@@ -291,13 +291,19 @@ static void accept_mutex_init(apr_pool_t *p)
static void accept_mutex_on(void)
{
apr_status_t rv = apr_lock(accept_lock);
- ap_assert(!rv);
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't grab the accept mutex");
+ exit(APEXIT_CHILDFATAL);
+ }
}
static void accept_mutex_off(void)
{
apr_status_t rv = apr_unlock(accept_lock);
- ap_assert(!rv);
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "couldn't release the accept mutex");
+ exit(APEXIT_CHILDFATAL);
+ }
}
/* On some architectures it's safe to do unserialized accept()s in the single