httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: Shared memory in APR. (fwd)
Date Mon, 12 Jul 1999 06:06:25 GMT

In article <> you wrote:
> I want shared memory in APR, but I hit a problem that I am having a hard
> time designing around.  Any shared memory model we use, has to work across
> a for and a fork/exec.  The MM library, AFAIK, only works across a fork,
> which doesn't make it portable for platforms like Win32, or any other that
> doesn't have fork.  What we need, is a function like
> get_shared_mem_in_child() (but named something much shorter), that allows
> the child to specify a key, and returns the shared memory segment.  I
> haven't had the time to invest to put this code into MM, so I have put it
> off.  I mentioned this problem in my note about releasing APR 0.9.  Ralf,
> if I am missing something, please let me know.  If not, shared memory
> won't go into APR until I somebody figures out how to get it into MM.

Hmmm.... you perhaps now that the reason why MM doesn't provide such shared
memory segment _attachments_ from independent processes (a fork+exec according
to shared memory is actually a independent process) is for portability
reasons. Because MM uses 5 different shared memory implementations in the
background and not all of them allow such attachments through unique ids from
unrelated processes.

OTOH can you describe it in more detail why APR needs a shared memory model
which works over fork/exec, Ryan? I've to admit that currently I'm wondering
why this is really necessary...
                                       Ralf S. Engelschall

View raw message