httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Havard" <bri...@kheldar.apana.org.au>
Subject Re: Shared memory in APR. (fwd)
Date Mon, 12 Jul 1999 15:36:58 GMT
On Mon, 12 Jul 1999 17:11:55 +0200, Ralf S. Engelschall wrote:

>> This is necessary, because ANY non-unix-like platform requires it.
>> Windows doesn't have fork, it only has spawn.  The AS/400 doesn't have
>> fork.  OS/2 has fork, but it is really expensive, and it MIGHT make sense
>> to have OS/2 use spawn instead of fork.  APR is also supposed to be a
>> general Portable runtime, not an Apache-specific portable runtime.  It is
>> possible other programs might want a method for doing this.  I know, the
>> second argument isn't great, but it is ancillary.  The REAL reason we need
>> to be able to do this, is the platforms we are going to support which
>> don't have the option of using fork, or those where using fork is the
>> wrong decision.
>
>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. 

Err, no, you can spawn child processes, not just threads. A process spawn is
just like a fork()/exec() without the wastage of a fork(). In this case you
have no common or inherited memory area so it helps if the child can open
some shared memory owned by the parent somehow.

--
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------


Mime
View raw message