From 3fa798d7a02f5eef6be8ac29e57cf37df00edc4a Mon Sep 17 00:00:00 2001 From: Mike Langmayr Date: Tue, 3 Nov 2026 14:20:29 -0800 Subject: [PATCH] Create SHM segments 0666 so any reader can wait on their semaphores --- docs/configuration/frame-outputs.md | 3 ++- utils/shared_memory_writer.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/configuration/frame-outputs.md b/docs/configuration/frame-outputs.md index 784eb39..68e7a97 100644 --- a/docs/configuration/frame-outputs.md +++ b/docs/configuration/frame-outputs.md @@ -40,7 +40,8 @@ Frame geometry is deliberately not a key. An ImageStreamIO stream's geometry is lifetime, so the writer recreates the stream whenever the geometry changes from what is allocated. Unlike the FITS writer, this output posts a semaphore per frame, so it is the right attachment point -for anything that has to wake up on every frame. +for anything that has to wake up on every frame. The semaphores live inside the segment, so a reader +opens it read-write; segments are created `0666` so any local user can attach. ### Readers diff --git a/utils/shared_memory_writer.cpp b/utils/shared_memory_writer.cpp index 6bb30eb..f3c8f80 100644 --- a/utils/shared_memory_writer.cpp +++ b/utils/shared_memory_writer.cpp @@ -16,7 +16,7 @@ namespace { constexpr int NUM_KEYWORDS = 3; // FRAMENO, TIMESTMP, SEQNUM - constexpr mode_t SEGMENT_MODE = 0664; // group-writable so a co-user can clean up a leftover + constexpr mode_t SEGMENT_MODE = 0666; // readers open read-write to wait on the in-segment semaphores void set_long_keyword(IMAGE_KEYWORD &keyword, const char *name, int64_t value, const char *comment) {