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

Fix: Add SA_RESTART flag to sigaction syscall #14351

Conversation

ysbaddaden
Copy link
Contributor

We recently changed from signal(2) to sigaction(2) and some IO related syscalls started failing with EINTR.

Reading the different manpages, BSD changed signal(2) to have SA_RESTART semantics, which glibc on Linux followed by not calling the signal syscall but instead calling sigcation with the SA_RESTART flag.

closes #14350

We recently changed from signal(2) to sigaction(2) and some IO related
syscalls started failing with EINTR.

Reading the different manpages, BSD changed signal(2) to have SA_RESTART
semantics, which glibc on Linux followed by not calling the signal
syscall but instead calling sigcation with the SA_RESTART flag.
@ysbaddaden ysbaddaden marked this pull request as draft March 7, 2024 13:22
@HertzDevil HertzDevil added topic:stdlib:system kind:regression Something that used to correctly work but no longer works labels Mar 7, 2024
@ysbaddaden ysbaddaden marked this pull request as ready for review March 7, 2024 15:48
@straight-shoota straight-shoota added this to the 1.12.0 milestone Mar 7, 2024
@straight-shoota straight-shoota changed the title Fix: add SA_RESTART flag to sigaction syscall Fix: Add SA_RESTART flag to sigaction syscall Mar 8, 2024
@straight-shoota straight-shoota merged commit d15649f into crystal-lang:master Mar 8, 2024
58 checks passed
@ysbaddaden ysbaddaden deleted the fix/add-sa-restart-to-sigaction branch March 8, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug kind:regression Something that used to correctly work but no longer works topic:stdlib:system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: Interrupted system call in CI
3 participants