mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-30 08:01:18 +01:00
Dev/shm fix remove (#1279)
* one doesnt need to open shared memory to call removesharedmemory, and calling hasMemoryvalid without opening will cause segfault (not used now, but could in the future) * fix test on shm
This commit is contained in:
@@ -3396,11 +3396,11 @@ void Module::createSharedMemory(detectorType type, int det_id) {
|
||||
|
||||
// ensure shared memory was not created before
|
||||
if (shm.exists()) {
|
||||
throw SharedMemoryError(
|
||||
"This shared memory " + shm.getName() +
|
||||
" should have been deleted before! Free it to continue.");
|
||||
LOG(logWARNING)
|
||||
<< "This shared memory " + shm.getName() +
|
||||
" should have been deleted before! Freeing it to continue.";
|
||||
shm.removeSharedMemory();
|
||||
}
|
||||
|
||||
shm.createSharedMemory();
|
||||
initializeModuleStructure(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user