apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc G. Fournier" <scra...@hub.org>
Subject Re: shm* equivalents (Was: Re: libapr* ...)
Date Mon, 06 May 2002 16:20:45 GMT
On Mon, 6 May 2002, Aaron Bannert wrote:

> On Mon, May 06, 2002 at 10:23:39AM -0300, Marc G. Fournier wrote:
> > 	Just wondering if anyone has looked at (or does it already exist)
> > creating a simple SysV SHM compatibility API, so that it 'plugs-n-plays'
> > nicer with existing programs?
> APR's apr_shm.h API is really just for working with other APR apps.
> If you want two processes to be able to map the same segment, they both
> must use APR. What kind of functionality is missing?

This I understand, and it isn't a problem, since the only processes
accessing 'shared memory' are child processes from the parent that
originally creates it ...

The issue that I have, and may be one that makes APR not usable, is that
we don't to throw out the SysV shm* stuff that is in PgSQL, we want to
extend the code so that *if* libapr.* is available, and the person
compiling wishes to use it, they can ... so what I was planning on doing
was making wrappers in the code so that:

shmget became pg_shmget

and pg_shmget had an

#ifdef USE_APR
  <do this>
  <use normal shmget>

but the problem is that APRs args don't seem to map to shm*'s, which means
I'd *really* have to hack the code to get it to work with APR ... unless
I'm missing something?

View raw message