Ilya Obshadko <[EMAIL PROTECTED]> wrote:
>My point was NOT to tie separately in each child, but execute tie()
>once during startup. The code of module that is being loaded
>from startup.pl looks like this:
>
>BEGIN {
> use IPC::Shareable;
> tie %RADDR_CACHE,
> 'IPC::Shareable',
> { key => 'href', mode => 0666, create => 1 };
>}
>
>[bla-bla-bla]
>
>END {
> untie %RADDR_CACHE;
>}
Ahh... I think I tried that too at one point, but couldn't get it to work like I
wanted -- at which point, I went to the children creating it...
>It works fine for me, i.e. all children has a proper access to
>segment, can read & write all that I need and so on.
>But if I tie() with { destroy => 1 }, segment is being destroyed in
>approximately 10 seconds after httpd startup (seems like httpd
>parent restarts itself after initialization). So I've tried to destroy
>segment manually and then found that END {} is not executed during
>parent shutdown...
The initial Apache process will load the configs and restart, etc., twice during
startup. This is explained either in the mail archives or the docs somewhere -- I've
seen Stas give an explanation before on this list.
--
James Smith <[EMAIL PROTECTED]>, 409-862-3725
Texas A&M CIS Operating Systems Group, Unix