MCPcopy Create free account
hub / github.com/apache/httpd / create_namebased_scoreboard

Function create_namebased_scoreboard

server/scoreboard.c:183–202  ·  view source on GitHub ↗

* Create a name-based scoreboard in the given pool using the * given filename. */

Source from the content-addressed store, hash-verified

181 * given filename.
182 */
183static apr_status_t create_namebased_scoreboard(apr_pool_t *pool,
184 const char *fname)
185{
186#if APR_HAS_SHARED_MEMORY
187 apr_status_t rv;
188
189 /* The shared memory file must not exist before we create the
190 * segment. */
191 apr_shm_remove(fname, pool); /* ignore errors */
192
193 rv = apr_shm_create(&ap_scoreboard_shm, scoreboard_size, fname, pool);
194 if (rv != APR_SUCCESS) {
195 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00001)
196 "unable to create or access scoreboard \"%s\" "
197 "(name-based shared memory failure)", fname);
198 return rv;
199 }
200#endif /* APR_HAS_SHARED_MEMORY */
201 return APR_SUCCESS;
202}
203
204/* ToDo: This function should be made to handle setting up
205 * a scoreboard shared between processes using any IPC technique,

Callers 1

open_scoreboardFunction · 0.85

Calls 1

ap_log_errorFunction · 0.50

Tested by

no test coverage detected