apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Amar <ja...@amar.com>
Subject Re: Shared Memory Usage Example
Date Fri, 01 Jun 2007 18:03:00 GMT
josh rotenberg wrote:
> I haven't looked at them  that closely, but it looks like in the APR
> distribution there are a few tests that exercise the apr_shm_* stuff,
> namely testshm.c, testshmproducer.c, and testshmconsumer.c. Do these
> get you anywhere?
> Josh

Thanks Josh,

I went ahead and did RTFC. It seems that non anonymous shared memory is 
using memory mapped files, as opposed to the Linux way of using a 16 bit 
name in a shared memory. It is more susceptible to name clobbering, but 
eliminates the need to make sure there is a write permissible file 
available on every client.

I guess I will have to implement using good old ipcs shm and one day 
attempt to emend the apr lib for it. Just not good enough in 
Windows/Novell environment to make it portable.

- Jacques

> On 5/31/07, Jacques Amar <jaapr@amar.com> wrote:
>> I am using apr in a non httpd application. I would like to use a shared
>> memory area to pass information between two different standalone
>> programs, so I need the shmem to be named. I am trying NOT to resort to
>> the built-in Linux shmget. Can anyone point a code example of this being
>>   done properly. My current example gives me an error 17 => File Exists.
>> Thanks

View raw message