On Wed, May 26, 2004 at 07:24:15PM +0530, Amit Athavale wrote:
> >
> >
> >This stuff is a complete mess in APR. The name-based shmget method
> >*does* use and create a real file, but it's redundant AFAICT;
> >
>
> It's not completely redundunt AFAIU.
>
> The shmkey param passed to shmget is calculated using ftok(). On some
> platforms ftok() fails if file does not exists.
Oh, right, and uses the inode number, so it must continue to exist...
> >all it
> >does is store the size of the segment, which shmctl will tell you anyway
> >on.
> >
> Interesting . Why APR stores/read this value from file ? Isn't shmctl is
> better (fast?)
> than file - (open/read/close) sequence ?
And less fragile, yeah, nobody had a reason for doing it last time I
asked.
joe
|