apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject apr_shm_attach() and APR_EEXIST
Date Tue, 25 May 2004 23:33:19 GMT
Hi all,

I am currently trying to figure out how this piece of code is going pear 

     result = apr_shm_create(&st->cache_shm, st->cache_bytes, 
st->cache_file, st->pool);
     if (result == APR_EEXIST) {
         result = apr_shm_attach(&st->cache_shm, st->cache_file, st->pool);
     if (result != APR_SUCCESS) {
         return result;

When this code is run, apr_shm_create() returns APR_EEXIST, even when 
the file does not exist.

Then, apr_shm_attach() returns 70014, which seems to correspond to 
APR_EGENERAL. The apr docs don't mention return codes, so I have no idea 
if this is normal or not.

At the end of this, the shared memory segment file appears to be 
created, but with a length of zero.

Can anyone explain how I can get an APR_SUCCESS out of the above? I am 


View raw message