apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject Re: [PATCH] apr_shm_create/shmget/fopen flags
Date Fri, 13 Dec 2002 21:18:58 GMT
On Fri, Dec 13, 2002 at 09:41:51AM -0800, Aaron Bannert wrote:
> If your application is sure that the segment is not in use, then remove
> the file.

OK, fair enough, thanks.

> >2) why is the file used to store the segment size, rather than using 
> >the
> >shm_segsz member of the shmid_ds structure?
> I assume you're talking about APR_USE_SHMEM_SHMGET and not SHMGET_ANON?

Yup, name-based as I said...

> I can't remember why I did that, but I think there was a reason. It
> might have had to do with page-alignment of the size, or the need for
> the actual requested size rather than the OS's returned size.

shmget is defined (by Single Unix, the Solaris and Linux man pages say
the same) specifically to store the value of the size parameter in
shm_segsz - is there a platform where this isn't true that you know of?
(it's a bit clumsy and adds more error paths so it would be nice to
remove if possible)



View raw message