Skip to content

Prevent SIGPIPE from terminating the macOS app #132

Description

@richardcase

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highHigh-impact reliability or security issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions