* Create a name-based scoreboard in the given pool using the * given filename. */
| 181 | * given filename. |
| 182 | */ |
| 183 | static 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, |
no test coverage detected