Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main: really ignore SIGPIPE #745

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

main: really ignore SIGPIPE #745

wants to merge 1 commit into from

Conversation

pkova
Copy link
Collaborator

@pkova pkova commented Nov 22, 2024

When testing 410 with vere-v3.2 I've repeatedly ran into an issue where my ship turns off every few days. This was caused by the king receiving a SIGPIPE, something we ostensibly are ignoring with sigaction, however:

In a multi-threaded application, there is always the question of which thread the signal will actually 
be delivered to. Or does it get delivered to all the threads? [...]

If it is an asynchronous signal, it could go to any of the threads that haven't masked out 
that signal using sigprocmask().

Our "multi-threaded" application is the libuv thread pool. Using pthread_sigmask fixes the issue since all child threads inherit the signal mask.

@pkova pkova requested a review from a team as a code owner November 22, 2024 15:49
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