apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1561357 - in /apr/apr/branches/1.5.x: ./ poll/unix/z_asio.c shmem/unix/shm.c
Date Sat, 25 Jan 2014 18:22:55 GMT
Author: jim
Date: Sat Jan 25 18:22:55 2014
New Revision: 1561357

URL: http://svn.apache.org/r1561357
Log:
Merge r1561356 from trunk:

Get working on OSX and others.

Reviewed/backported by: jim

Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/poll/unix/z_asio.c   (props changed)
    apr/apr/branches/1.5.x/shmem/unix/shm.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1561356

Propchange: apr/apr/branches/1.5.x/poll/unix/z_asio.c
------------------------------------------------------------------------------
  Merged /apr/apr/trunk/poll/unix/z_asio.c:r1561356

Modified: apr/apr/branches/1.5.x/shmem/unix/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/shmem/unix/shm.c?rev=1561357&r1=1561356&r2=1561357&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/shmem/unix/shm.c (original)
+++ apr/apr/branches/1.5.x/shmem/unix/shm.c Sat Jan 25 18:22:55 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);
 



Mime
View raw message