diff --git a/include/storage/shared_monitor.hpp b/include/storage/shared_monitor.hpp index c9e901902..46048e487 100644 --- a/include/storage/shared_monitor.hpp +++ b/include/storage/shared_monitor.hpp @@ -117,10 +117,12 @@ template struct SharedMonitor #endif static void remove() { bi::shared_memory_object::remove(Data::name); } - static bool exists() { + static bool exists() + { try { - bi::shared_memory_object shmem_open = bi::shared_memory_object(bi::open_only, Data::name, bi::read_only); + bi::shared_memory_object shmem_open = + bi::shared_memory_object(bi::open_only, Data::name, bi::read_only); } catch (const bi::interprocess_exception &exception) { diff --git a/src/tools/store.cpp b/src/tools/store.cpp index 16a9dba4d..db71599d2 100644 --- a/src/tools/store.cpp +++ b/src/tools/store.cpp @@ -27,9 +27,9 @@ void deleteRegion(const storage::SharedRegionRegister::ShmKey key) void listRegions() { + osrm::util::Log() << "name\tshm key\ttimestamp\tsize"; if (!storage::SharedMonitor::exists()) { - osrm::util::Log() << "No shared memory regions found. Try running osrm-datastore"; return; } storage::SharedMonitor monitor;