Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72715 - in trunk/boost/interprocess: . sync/posix
From: igaztanaga_at_[hidden]
Date: 2011-06-21 16:15:55


Author: igaztanaga
Date: 2011-06-21 16:15:54 EDT (Tue, 21 Jun 2011)
New Revision: 72715
URL: http://svn.boost.org/trac/boost/changeset/72715

Log:
Fixed semaphore_unlink for XSI emulation and error when mapping fails
Text files modified:
   trunk/boost/interprocess/errors.hpp | 3 ++-
   trunk/boost/interprocess/mapped_region.hpp | 2 +-
   trunk/boost/interprocess/sync/posix/semaphore_wrapper.hpp | 2 +-
   3 files changed, 4 insertions(+), 3 deletions(-)

Modified: trunk/boost/interprocess/errors.hpp
==============================================================================
--- trunk/boost/interprocess/errors.hpp (original)
+++ trunk/boost/interprocess/errors.hpp 2011-06-21 16:15:54 EDT (Tue, 21 Jun 2011)
@@ -157,7 +157,8 @@
    { /*ERROR_DISK_FULL*/112L, out_of_space_error },
    { /*ERROR_OUTOFMEMORY*/14L, out_of_memory_error },
    { /*ERROR_NOT_ENOUGH_MEMORY*/8L, out_of_memory_error },
- { /*ERROR_TOO_MANY_OPEN_FILES*/4L, out_of_resource_error }
+ { /*ERROR_TOO_MANY_OPEN_FILES*/4L, out_of_resource_error },
+ { /*ERROR_INVALID_ADDRESS*/487L, busy_error }
    #else //#if (defined BOOST_INTERPROCESS_WINDOWS)
    { EACCES, security_error },
    { EROFS, read_only_error },

Modified: trunk/boost/interprocess/mapped_region.hpp
==============================================================================
--- trunk/boost/interprocess/mapped_region.hpp (original)
+++ trunk/boost/interprocess/mapped_region.hpp 2011-06-21 16:15:54 EDT (Tue, 21 Jun 2011)
@@ -524,7 +524,7 @@
 
    //Check for fixed mapping error
    if(address && (old_base != address)){
- error_info err = system_error_code();
+ error_info err(busy_error);
       this->priv_close();
       throw interprocess_exception(err);
    }

Modified: trunk/boost/interprocess/sync/posix/semaphore_wrapper.hpp
==============================================================================
--- trunk/boost/interprocess/sync/posix/semaphore_wrapper.hpp (original)
+++ trunk/boost/interprocess/sync/posix/semaphore_wrapper.hpp 2011-06-21 16:15:54 EDT (Tue, 21 Jun 2011)
@@ -103,7 +103,7 @@
       #else
       detail::tmp_filename(semname, sem_str);
       #endif
- return 0 != sem_unlink(sem_str.c_str());
+ return 0 == sem_unlink(sem_str.c_str());
    }
    catch(...){
       return false;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk