From 91c3d33fb0ee5dc1ecbf11455a03e3bf4af0f11e Mon Sep 17 00:00:00 2001 From: Aaron Bannert Date: Wed, 23 Jan 2002 06:51:18 +0000 Subject: [PATCH] Although this patch is technically correct, I'm not happy with the way it gets things done. OTOH, it is a simple enough change to get things working correctly for now. I will come up with the right way to do this in the next couple days. This patch re-enables the use of anonymous shared memory in the scoreboard on platforms that have it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92978 13f79535-47bb-0310-9956-ffa450edef68 --- server/scoreboard.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/server/scoreboard.c b/server/scoreboard.c index 1365dfccce..ddc526f95e 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -164,15 +164,24 @@ static apr_status_t open_scoreboard(apr_pool_t *p) apr_status_t rv; char *fname = NULL; - if (ap_scoreboard_fname) { - fname = ap_server_root_relative(p, ap_scoreboard_fname); - } rv = apr_shm_create(&scoreboard_shm, scoreboard_size, fname, p); - if (rv != APR_SUCCESS) { + if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) { ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, - "Fatal error: could not open(create) scoreboard"); + "Fatal error: could not create scoreboard " + "(using anonymous shared memory)"); return rv; } + if (rv == APR_ENOTIMPL) { + if (ap_scoreboard_fname) { + fname = ap_server_root_relative(p, ap_scoreboard_fname); + } + rv = apr_shm_create(&scoreboard_shm, scoreboard_size, fname, p); + if (rv != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, + "Fatal error: could not open(create) scoreboard"); + return rv; + } + } /* everything will be cleared shortly */ #endif return APR_SUCCESS; -- 2.50.1