mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-15 04:18:41 +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:
@@ -29,7 +29,6 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
|
||||
if (moduleIndex >= 0) {
|
||||
SharedMemory<sharedModule> moduleShm(detectorIndex, moduleIndex);
|
||||
if (moduleShm.exists()) {
|
||||
moduleShm.openSharedMemory(false);
|
||||
moduleShm.removeSharedMemory();
|
||||
}
|
||||
return;
|
||||
@@ -48,7 +47,6 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
|
||||
for (int i = 0; i < numDetectors; ++i) {
|
||||
SharedMemory<sharedModule> moduleShm(detectorIndex, i);
|
||||
if (moduleShm.exists()) {
|
||||
moduleShm.openSharedMemory(false);
|
||||
moduleShm.removeSharedMemory();
|
||||
}
|
||||
}
|
||||
@@ -56,7 +54,6 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
|
||||
// Ctb configuration
|
||||
SharedMemory<CtbConfig> ctbShm(detectorIndex, -1, CtbConfig::shm_tag());
|
||||
if (ctbShm.exists()) {
|
||||
ctbShm.openSharedMemory(false);
|
||||
ctbShm.removeSharedMemory();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user