From 00afb78833cc74b76331937a598b28ae9d34204d Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Sat, 25 Jan 2014 18:21:54 +0000 Subject: Get working on OSX and others. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1561356 13f79535-47bb-0310-9956-ffa450edef68 --- shmem/unix/shm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shmem') 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); -- cgit v1.2.1