Hi,
I recall that in general it is not a good idea to open
a file in the parent modperl process and then share it
among the child modperl processes. One should open the
file separately in each of the child processes. But what
if the file is used just for read-only access? Is it still
necessary to open the file separately in the child
processes? It seems to be more efficient to share if it
can be done reliably.
a file in the parent modperl process and then share it
among the child modperl processes. One should open the
file separately in each of the child processes. But what
if the file is used just for read-only access? Is it still
necessary to open the file separately in the child
processes? It seems to be more efficient to share if it
can be done reliably.
The practical-modperl book gives an example showing
how to open a read-only dbm file from child init handler
in each of the child process. But there is no rational given.
For the few tests I have done using MLDBM, opening the
file in the parent process and then sharing that among
the child processes seems to work fine. But I would like to know
if there are any potential problems associated with this practice.
if there are any potential problems associated with this practice.
Thanks for any info.
Richard Chen
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'