apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Athavale <amit_athav...@persistent.co.in>
Subject Re: apr_shm_attach() and APR_EEXIST
Date Wed, 26 May 2004 13:54:15 GMT
>
>
>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.

But yes thats  the only use of file.

>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 ?



Mime
View raw message