Skip to content

Fix: Add SA_RESTART flag to sigaction syscall#14351

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
ysbaddaden:fix/add-sa-restart-to-sigaction
Mar 8, 2024
Merged

Fix: Add SA_RESTART flag to sigaction syscall#14351
straight-shoota merged 2 commits intocrystal-lang:masterfrom
ysbaddaden:fix/add-sa-restart-to-sigaction

Conversation

@ysbaddaden
Copy link
Collaborator

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 added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Mar 7, 2024
@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
@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 A bug in the code. Does not apply to documentation, specs, etc. 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