log err instead of throwing when no shmem regions found
This commit is contained in:
committed by
Patrick Niklaus
parent
16abee1022
commit
730d2b5ef2
@@ -117,6 +117,17 @@ template <typename Data> struct SharedMonitor
|
||||
#endif
|
||||
|
||||
static void remove() { bi::shared_memory_object::remove(Data::name); }
|
||||
static bool exists() {
|
||||
try
|
||||
{
|
||||
bi::shared_memory_object shmem_open = bi::shared_memory_object(bi::open_only, Data::name, bi::read_only);
|
||||
}
|
||||
catch (const bi::interprocess_exception &exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
#if USE_BOOST_INTERPROCESS_CONDITION
|
||||
|
||||
Reference in New Issue
Block a user