richardcase / richardcase/clowder
Prevent SIGPIPE from terminating the macOS app
Open
Nobody has claimed this yet.
bug
priority: high
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 16
Description
Problem
UnixSocketConnection.send calls POSIX write(2) without suppressing SIGPIPE. If the daemon closes between the connection check and the write, Darwin can terminate the app instead of returning an error.
Acceptance criteria
- Set
SO_NOSIGPIPEwhen creating the socket, or use an equivalent safe write path. - Preserve clean
EPIPE/connection errors for callers. - Add a test that closes the peer and verifies the process survives.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading macos/Sources/ClowderCore/UnixSocketConnection.swift around lines 86-100 and trace socket creation through UnixSocketConnection.send. Add coverage that closes the peer and verifies the process survives while callers receive a clean EPIPE or connection error. Done means SIGPIPE no longer terminates the macOS app and the new test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100