Dev/shm fix remove (#1279)
Some checks failed
Build on RHEL9 / build (push) Failing after 3m30s
Build on RHEL8 / build (push) Failing after 5m9s

* 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:
2025-08-25 16:20:19 +02:00
committed by GitHub
parent 9af571ea0e
commit 5b069d85a8
5 changed files with 36 additions and 20 deletions

View File

@@ -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();
}
}