I am testing the following idea to refresh sporadically
changed read-only data cache. 

The parent modperl process first cache a data hash %foo.
Now all the child modperl processes will inherit this data hash.
We install a signal handler in the parent process to reload the
hash when a USR2 signal is received.

To refresh the cached data %foo. First I obtain a list of
child processes. Then I send a USR2 signal to the parent
process to reload the data. Then I send USR1 signal to the
list of child processes already recorded to make them gracefully exit.
At this point, all the memory about the old data should be gone.

So now the parent modperl process has newly freshed data. 
The future children should inherit this changed data. But I
found this not to be the case. The data in the parent process
is indeed changed. But the newly spawned children still retains the
old data hash. At least that is what my preliminary testing shows.

My question is where does the logic break in the above scenario?
I tried this on a solaris box.

Thanks for any info.

Richard

Reply via email to