Skip to content

fix(extractinitrd): retry waitpid on EINTR in wait_for_child - #2819

Merged
Conan-Kudo merged 1 commit into
dracut-ng:mainfrom
bdrung:retry-wait
Nov 14, 2026
Merged

Conan-Kudo merged 1 commit into
dracut-ng:mainfrom
bdrung:retry-wait

Conversation

@bdrung

@bdrung bdrung commented Nov 5, 2026

Copy link
Copy Markdown
Member

If a signal is caught while waiting for a child process, waitpid(2) can fail with EINTR. Wrap waitpid() in a retry loop to prevent spurious child wait failures.

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

If a signal is caught while waiting for a child process, waitpid(2)
can fail with EINTR. Wrap waitpid() in a retry loop to prevent
spurious child wait failures.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the change to retry waitpid() when interrupted by a signal.

No open issues 🎉

What changed in this PR

This PR prevents spurious child-wait failures in extractinitrd when a signal interrupts waitpid().

Changes:

  • Retry waitpid() when it fails with EINTR.
  • Preserve existing failure handling for other wait errors.
File Description
src/​extractinitrd/​extractinitrd.c Add an interruption retry loop in wait_for_child().

Review effort: Balanced

@devkontrol devkontrol added this to the 113 milestone Nov 14, 2026
@Conan-Kudo
Conan-Kudo enabled auto-merge (rebase) November 14, 2026 09:11
@Conan-Kudo
Conan-Kudo merged commit 90726b2 into dracut-ng:main Nov 14, 2026
127 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants