Elizabeth Mattijsen wrote:That's what you told me back in July, which I liked. Though I haven't seen it at work yet.my $updating; $SIG{123} = sub { return if $updating++; # make sure only one at a time #update data structures; $updating = 0; };
okokok... ;-)
But if you do that already, why not just hup the server right away and let it reread the cached data that some child has updated.
hup it as in graceful restart? But I don't need it to re-read all of my Perl modules, plus their inherent initializations... I just need e.g. a hash updated...
So you could have the readonly cache preloaded at the server startup, initialized from the writable cache which can be updated by an external process or an httpd child, but which won't affect the read-only copy.
If I read you right: but I _do_ want to update the read-only copy, so that it becomes shared with all new children...
I think Apache::DB_File is just what you are after.
Is that on CPAN? I can't find it. I _can_ find Apache::Session::DB_File and Apache::Session::Store::DB_File, is that what you mean?
I don't think there is any other way to make parent do something. Remember that all it does is sitting in a tight loop and watching after the number of available child processes and spawns new ones/kills old ones.
But the select loop is in the parent, isn't it? It would make sense to me to have the PreConnectionHandler run in the parent, so it doesn't need to start up a child, only to find out that you won't accept the connection...
But anyway, I'll first go an try to see whether a signal handler will do the trick... ;-)
Liz
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html