richardcase / richardcase/clowder

Prevent SIGPIPE from terminating the macOS app

Open
#132 0 comments 0 reactions 0 assignees View on GitHub

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.

Evidence: https://github.com/richardcase/clowder/blob/b5492d5/macos/Sources/ClowderCore/UnixSocketConnection.swift#L86-L100

Acceptance criteria

  • Set SO_NOSIGPIPE when 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.