Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: [patch] Apache->server->pool: msg#00128

apache.mod-perl.devel

Subject: Re: [patch] Apache->server->pool

Geoffrey Young wrote:

Oops, that's a bad copy-n-paste, should be:

$s->process->pool->cleanup_register(\&cleanup_callback, $data);


ok, that works. well, sort of. I can make the call but the code (again) never runs. have you tried it?

I meant to use $s->process->pool to get the pool. I didn't do any claims about cleanup_register() on server working ;)

anyway, here is a patch that seems to fit the bill. well, almost. it implements Apache->server->pool(), which you can now use to register cleanups via Apache->server->pool->cleanup_register(). all tests pass.

$s->process->pool is not good? (agreed that it's not very intuitive, but that's where it lives in the apache structs.)


outside of its not working, that's fine. a little less intuitive, yes, but no biggie.

$s->process->pool is working. The cleanup registration is not. It's not the same. My question was whether we need to have an alias so we can get $s->pool do $s->process->pool.

actually, now that I know this,

$s->process->pconf->cleanup_register()

yup, the main pool.

is really what I was after, since I want to capture configuration -HUP changes. it's nice that process_rec gives you that kind of granularity. cool.

Cool.

and the modperl_child_exit function in the same file. Notice how the child_exit is executed and that the pool is cleared only if destruct level is set.


cool :)


I suppose what you should do instead is:

$s->push_handlers(PerlChildExitHandler => 'my_cleanup');


well, that's not exactly the same. in 1.0 $s->register_cleanup() called the sub on server exits or restarts - that's what I'm looking to duplicate here.

at any rate, it looks like process->pool() and process->pconf() will fit the bill... if only they actually worked :)

So this part probably needs work.

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation