Skip to content

macOS support for fake backend#689

Merged
adeebshihadeh merged 5 commits into
masterfrom
adeebshihadeh/portable-fake-backend
May 16, 2026
Merged

macOS support for fake backend#689
adeebshihadeh merged 5 commits into
masterfrom
adeebshihadeh/portable-fake-backend

Conversation

@adeebshihadeh
Copy link
Copy Markdown
Contributor

No description provided.

Use POSIX shm_open instead of a /tmp file for the EventState shm — RAM-backed
on Linux (/dev/shm) and macOS (POSIX shm namespace). FIFO paths stay in /tmp
since FIFO data lives in kernel pipe buffers, not the filesystem.

macOS limits shm_open names to ~31 chars, so hash (prefix, identifier, endpoint)
into a fixed `/msgq_<16 hex>` name. macOS also rejects ftruncate on an
already-sized shm object, so check the size first.
CI was failing on Linux: a stray signal delivered to the forked daemon during
poll returned EINTR, which my code propagated as a runtime_error, killing the
daemon. Master's ppoll+sigmask blocked most signals so EINTR never came up in
practice. Switch to a deadline-based poll wrapper that retries on EINTR, and
add the same retry to set()/clear().
@adeebshihadeh adeebshihadeh merged commit 6189f41 into master May 16, 2026
1 of 2 checks passed
@adeebshihadeh adeebshihadeh deleted the adeebshihadeh/portable-fake-backend branch May 16, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant