Is it safe to share a read-only dbm file opened in parent modperl?
[prev]
[thread]
[next]
[Date index for 2005/02/15]
--0-1462377555-1108503816=:13502
Content-Type: text/plain; charset=us-ascii
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.
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.
Thanks for any info.
Richard Chen
---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'
--0-1462377555-1108503816=:13502
Content-Type: text/html; charset=us-ascii
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV> I recall that in general it is not a good idea to open<BR>a file in the parent modperl process and then share it<BR>among the child modperl processes. One should open the<BR>file separately in each of the child processes. But what<BR>if the file is used just for read-only access? Is it still<BR>necessary to open the file separately in the child<BR>processes? It seems to be more efficient to share if it<BR>can be done reliably. </DIV>
<DIV> </DIV>
<DIV>The practical-modperl book gives an example showing</DIV>
<DIV>how to open a read-only dbm file from child init handler</DIV>
<DIV>in each of the child process. But there is no rational given.</DIV>
<DIV> </DIV>
<DIV>For the few tests I have done using MLDBM, opening the</DIV>
<DIV>file in the parent process and then sharing that among</DIV>
<DIV>the child processes seems to work fine. But I would like to know<BR>if there are any potential problems associated with this practice.</DIV>
<DIV> </DIV>
<DIV>Thanks for any info.</DIV>
<DIV> </DIV>
<DIV>Richard Chen<BR></DIV><p>
<hr size=1>Do you Yahoo!?<br>
Yahoo! Search presents - <a href="http://us.rd.yahoo.com/evt=30648/*http://movies.yahoo.com/movies/feature/jibjabinaugural.html">Jib Jab's 'Second Term'</a>
--0-1462377555-1108503816=:13502--
 |
Is it safe to share a read-only dbm file opened in parent modperl?
Richard Chen 21:43 on 15 Feb 2005
|