Skip to content

socketpair: clear 'err' when retrying due to EINTR#20809

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/wakeup-eintr
Closed

socketpair: clear 'err' when retrying due to EINTR#20809
bagder wants to merge 1 commit intomasterfrom
bagder/wakeup-eintr

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 3, 2026

If the first write was interrupted by a signal and a subsequent write succeeds, the function would still erroneously return EINTR.

Found by Codex Security

If the first write was interrupted by a signal and a subsequent write
succeeds, the function would still erroneously return EINTR.

Found by Codex Security
@github-actions github-actions bot added the name lookup DNS and related tech label Mar 3, 2026
@bagder bagder requested a review from Copilot March 4, 2026 10:09
@bagder bagder marked this pull request as ready for review March 4, 2026 10:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Curl_wakeup_signal() so it does not incorrectly return EINTR after a successful retry when the initial wakeup_write() was interrupted by a signal. This impacts the wakeup mechanism used by curl_multi_wakeup() / async resolver notification paths.

Changes:

  • Reset err at the start of each retry loop iteration in Curl_wakeup_signal() so a successful retry returns 0 rather than a stale EINTR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@bagder bagder closed this in e47b6e6 Mar 6, 2026
@bagder bagder deleted the bagder/wakeup-eintr branch March 6, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

name lookup DNS and related tech

Development

Successfully merging this pull request may close these issues.

2 participants