httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Shared memory in APR. (fwd)
Date Mon, 12 Jul 1999 17:51:03 GMT

> Ok, but I've to admit that I still don't understand the issue completely.
> When non-Unix platforms don't support fork() and instead some sort of thread
> spawning, why is this bad for shared memory? Isn't APR more lucky then? I mean
> the "shared memory" on these platforms we get for free, right? And on Unix we
> use MM for "real" shared memory. 

As somebody else mentioned, Brian I think, I am not talking about thread
spawning, but process spawning.  Take a look at Windows.  There is no fork
call, but there is a CreateProcess call.  This doesn't duplicate the
current process environment, but rather it creates an all new one.  I know
of at least two other platforms that have this problem.  We need a way to
reliably open shared memory in a child process that never shared data with
it's parent.  If this is not possible with MM, then we need to
re-implement MM for APR, IMO.  We support at least two platforms, where I
do not believe fork is the correct call to make.   :-)

> I think the problem in our communication is that you want a shared mem
> mechanism for APR which can be used between unrelated processed while I always
> thought that we only deal with related processes, right? That's the fork+exec
> goal you talked about, right? And is this _really_ necessary for APR? Hmmm..
> then ok, it gets even hard under Unix, of course.

Every Unix shared memory call I know of has a way to do this.  It is
simply a matter of designing things so that they work.  This is where I am
getting hung up.  Basically, we need a MM_child_reopen_shared_memory() 


Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message