You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ji...@apache.org on 2014/01/25 19:21:54 UTC
svn commit: r1561356 - /apr/apr/trunk/shmem/unix/shm.c
Author: jim
Date: Sat Jan 25 18:21:54 2014
New Revision: 1561356
URL: http://svn.apache.org/r1561356
Log:
Get working on OSX and others.
Modified:
apr/apr/trunk/shmem/unix/shm.c
Modified: apr/apr/trunk/shmem/unix/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/shmem/unix/shm.c?rev=1561356&r1=1561355&r2=1561356&view=diff
==============================================================================
--- apr/apr/trunk/shmem/unix/shm.c (original)
+++ apr/apr/trunk/shmem/unix/shm.c Sat Jan 25 18:21:54 2014
@@ -292,7 +292,7 @@ APR_DECLARE(apr_status_t) apr_shm_create
}
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
}
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);