Skip to content

Comments

signal: interruptible: prioritize wrapped future over signals#167

Merged
hexagonal-sun merged 1 commit intomasterfrom
fix-interrupt-poll-order
Jan 17, 2026
Merged

signal: interruptible: prioritize wrapped future over signals#167
hexagonal-sun merged 1 commit intomasterfrom
fix-interrupt-poll-order

Conversation

@hexagonal-sun
Copy link
Owner

Poll the wrapped future first, ensuring that the interrupt logic doesn't
short-circuit a future which is already ready.

This fixes an issue where sys_wait4 would return -EINTR when
receiving a SIGCHLD. Since SIGCHLD indicates the wait condition
is met, the underlying future is ready and should return the PID
successfully rather than aborting.

Poll the wrapped future first, ensuring that the interrupt logic doesn't
short-circuit a future which is already ready.

This fixes an issue where `sys_wait4` would return `-EINTR` when
receiving a `SIGCHLD`. Since `SIGCHLD` indicates the wait condition
is met, the underlying future is ready and should return the PID
successfully rather than aborting.
Copy link
Collaborator

@arihant2math arihant2math left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hexagonal-sun hexagonal-sun merged commit b9fa68d into master Jan 17, 2026
4 checks passed
@arihant2math arihant2math deleted the fix-interrupt-poll-order branch January 19, 2026 02:54
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.

2 participants