Hello,

Could someone help!?..  I always thought that it was technically
possible under mod_perl to share memory between Child processes..  

Having spent the w/e getting to grips with startup.pl's and the such I'm
beginning to discover that it's only possible to share read-only memory
and as soon as you write to memory it splits off.. .. 


What I really want to do is to write a module that can be accessed from
any of the child apache processes such that some work can be done at one
stage, and if the second request comes through to another child, that
child can pick up on the work of the first..  ..

Is there _absolutely_ no way that two children could ever have write
access to the same object?  Can the parent process not look after a
single object and allow children to make requests to functions within
the parent process that might alter the values of that object without
breaking the object into individual copies for each child??

Lastly, coming from a RiscOS background, it was always possible to issue
module interrupts such that one program can call the functions of
another completely separate program..  If this is possible in Perl, is
it therefore possible that one could set up a daemon of sorts that would
allow the Apache children to communicate with it.  If we were to take a
simple counter as an example, the parent-process/daemon would hold a
variable $count; and allow child processes to call a sort of "my
$current = get_count();" .. get_count would simply add one to $count and
return the total value.. .. but all children would be able to call the
get_count sub.. the actual value of $count would be held by some
parent/daemon process independent of Apache.. . .

It seems to me I'm missing some pretty basic inter-program communication
stuff.. but then all my experience of calling one linux prog from
another has usually worked by piping something from one to another..? -
Am I asking the impossible? Is it not the sort of thing Linux is capable
of or have I just missed the obvious solution?  

TIA & ATB,

Jimbo

 


_____________________________
Jim Morrison
Technology & Development Partner
Isotope Communications
9 Green Park Station
Bath, BA1 1JB, UK
+44 (0) 1225 444 674



Reply via email to