diff options
author | Jim Jagielski <jim@apache.org> | 2014-01-25 18:21:54 +0000 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2014-01-25 18:21:54 +0000 |
commit | 00afb78833cc74b76331937a598b28ae9d34204d (patch) | |
tree | 45412232d028a9212e9fa752143d7413a0fc849b /shmem | |
parent | 043ca4e51999f33b85c451aa8b5bc296c2f70074 (diff) | |
download | apr-00afb78833cc74b76331937a598b28ae9d34204d.tar.gz |
Get working on OSX and others.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561356 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/unix/shm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c index 0d026e31c..f180c2044 100644 --- a/shmem/unix/shm.c +++ b/shmem/unix/shm.c @@ -292,7 +292,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m, } status = apr_file_trunc(file, new_m->realsize); - if (status != APR_SUCCESS) { + if (status != APR_SUCCESS && status != APR_ESPIPE) { apr_file_close(file); /* ignore errors, we're failing */ apr_file_remove(new_m->filename, new_m->pool); return status; @@ -321,10 +321,11 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m, } status = apr_file_trunc(file, new_m->realsize); - if (status != APR_SUCCESS) { + if (status != APR_SUCCESS && status != APR_ESPIPE) { shm_unlink(shm_name); /* we're failing, remove the object */ return status; } + /* TODO: should we use new_m->realsize instead of reqsize ?? */ new_m->base = mmap(NULL, reqsize, PROT_READ | PROT_WRITE, MAP_SHARED, tmpfd, 0); |