ASF Bugzilla – Attachment 20875 Details for
Bug 43471
no need to create a global pool on open_scoreboard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
simple
simple.patch (text/plain), 2.52 KB, created by
Takashi Sato
on 2007-09-25 06:59:15 UTC
(
hide
)
Description:
simple
Filename:
MIME Type:
Creator:
Takashi Sato
Created:
2007-09-25 06:59:15 UTC
Size:
2.52 KB
patch
obsolete
>Index: trunk/server/scoreboard.c >=================================================================== >--- trunk/server/scoreboard.c (revision 579232) >+++ trunk/server/scoreboard.c (working copy) >@@ -177,39 +177,27 @@ > * a scoreboard shared between processes using any IPC technique, > * not just a shared memory segment > */ >-static apr_status_t open_scoreboard(apr_pool_t *pconf) >+static apr_status_t open_scoreboard(apr_pool_t *p) > { > #if APR_HAS_SHARED_MEMORY > apr_status_t rv; > char *fname = NULL; >- apr_pool_t *global_pool; > >- /* We don't want to have to recreate the scoreboard after >- * restarts, so we'll create a global pool and never clean it. >- */ >- rv = apr_pool_create(&global_pool, NULL); >- if (rv != APR_SUCCESS) { >- ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, >- "Fatal error: unable to create global pool " >- "for use by the scoreboard"); >- return rv; >- } >- > /* The config says to create a name-based shmem */ > if (ap_scoreboard_fname) { > /* make sure it's an absolute pathname */ >- fname = ap_server_root_relative(pconf, ap_scoreboard_fname); >+ fname = ap_server_root_relative(p, ap_scoreboard_fname); > if (!fname) { > ap_log_error(APLOG_MARK, APLOG_CRIT, APR_EBADPATH, NULL, > "Fatal error: Invalid Scoreboard path %s", > ap_scoreboard_fname); > return APR_EBADPATH; > } >- return create_namebased_scoreboard(global_pool, fname); >+ return create_namebased_scoreboard(p, fname); > } > else { /* config didn't specify, we get to choose shmem type */ > rv = apr_shm_create(&ap_scoreboard_shm, scoreboard_size, NULL, >- global_pool); /* anonymous shared memory */ >+ p); /* anonymous shared memory */ > if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) { > ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, > "Unable to create or access scoreboard " >@@ -220,9 +208,9 @@ > else if (rv == APR_ENOTIMPL) { > /* Make sure it's an absolute pathname */ > ap_scoreboard_fname = DEFAULT_SCOREBOARD; >- fname = ap_server_root_relative(pconf, ap_scoreboard_fname); >+ fname = ap_server_root_relative(p, ap_scoreboard_fname); > >- return create_namebased_scoreboard(global_pool, fname); >+ return create_namebased_scoreboard(p, fname); > } > } > #endif /* APR_HAS_SHARED_MEMORY */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43471
: 20875 |
20876
|
20881