diff options
author | jim <jim@13f79535-47bb-0310-9956-ffa450edef68> | 2014-01-25 18:22:55 +0000 |
---|---|---|
committer | jim <jim@13f79535-47bb-0310-9956-ffa450edef68> | 2014-01-25 18:22:55 +0000 |
commit | f9f6be779ed6d26a813fb0150b60084774cbcc06 (patch) | |
tree | 54744fe3daada5f7e38e11bb8c6fc88a0335bf36 /shmem | |
parent | 3089028f5a163f1bea5fe328cff2db50215ece63 (diff) | |
download | libapr-f9f6be779ed6d26a813fb0150b60084774cbcc06.tar.gz |
Merge r1561356 from trunk:
Get working on OSX and others.
Reviewed/backported by: jim
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1561357 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 0c05074f5..d771382ef 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); |