Skip to content

main: really ignore SIGPIPE#745

Merged
pkova merged 1 commit into
developfrom
pkova/sigpipe
Nov 25, 2024
Merged

main: really ignore SIGPIPE#745
pkova merged 1 commit into
developfrom
pkova/sigpipe

Conversation

@pkova

@pkova pkova commented Nov 22, 2024

Copy link
Copy Markdown
Collaborator

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
@pkova pkova merged commit de5c443 into develop Nov 25, 2024
@pkova pkova deleted the pkova/sigpipe branch November 25, 2024 11:32
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