|
|
Sponsor |
Re: segfault in worker mpm: msg#00194apache.mod-perl.devel
With anon-subs we need cover three cases of anon-subs: $r->push_handlers(PerlTransHandler => sub { .... }); $r->push_handlers(PerlTransHandler => eval 'sub { .... }'); PerlTransHandler 'sub { ... }' # httpd.conf Store the CODE refs in a special hash %ModPerl::__Subs::subs and store the key names in the mod_perl struct. It should transparently work with threads and resolves the problem with anon-subs. If we have a situation where an interpreter that wants to run an anon-sub can't find the key entry (if the interpreter has compiled it and registered with mod_perl), we just croak explaining that in this special case (and most people won't ever get here) one needs to preload such modules at the server startup. The only tricky parts is how to name the keys. We can't just increment some counter like Symbol.pm does, since it's quite possible that two interpreters will register different callbacks with the same key and there will be a big trouble. One solution is to generate the keys on the C side using an internal counter. The only minus is that we will need to handle locking of that resource which should be global to the process. Another solution is to somehow include __FILE__:__LINE__ to uniquely identify the anon-subs, but that will probably be hard to do. Ideas? meanwhile I'm trying to see whether this idea of %ModPerl::__Subs::subs will 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> |
|---|---|---|
| Previous by Date: | Re: [Patch mp2] unescape_url_info, Stas Bekman |
|---|---|
| Next by Date: | Re: [Patch mp2] segfault in worker mpm, Geoffrey Young |
| Previous by Thread: | Re: [Patch mp2] segfault in worker mpm, Philippe M. Chiasson |
| Next by Thread: | Re: cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm, Stas Bekman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|