bloomberg / bloomberg/ntf-core

Automatically apply SO_NOSIGPIPE or a platform equivalent socket option when available

Open
#200 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
99
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Traditionally, the Unixes raise a `SIGPIPE` signal for a write failure (usually when it occurs asynchronously.) Also traditionally, this is annoying for userspace programmers which prefer to handle the error as a return code or polled error. This desired behavior may be achieved by ignoring `SIGPIPE`, but this signal management must be applied process-wide. Automatically apply the non-portable `SO_NOSIGPIPE` socket option upon socket creation, or the `MSG_NOSIGNAL` flag when calling `sendmsg`, or any platform-specific equivalent, when available. These socket options and flags. achieve the same desired behavior but on a per-socket basis and do not require process-wide signal management.

Contributor guide

Open the contributing guide

Research direction

Start by locating the socket-creation and sendmsg entry points in ntf-core, then inspect how platform-specific socket options and flags are handled. Determine which available platform equivalent prevents SIGPIPE on a per-socket basis, and verify that socket writes return errors without requiring process-wide signal management.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.