Skip to content

uucore: don't let a process-group signal come back to the sender - #16821

Open
sylvestre wants to merge 1 commit into
uutils:mainfrom
sylvestre:timeout-own-group-signal
Open

sylvestre wants to merge 1 commit into
uutils:mainfrom
sylvestre:timeout-own-group-signal

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

send_signal_group sets the signal to SIG_IGN while it kills its own process group, but the kernel only discards an ignored signal that is not blocked. timeout blocks these signals to consume them with sigwait, so it read back the signal it had just sent and killed the child with SIGKILL instead of letting it die on its own.

Discard the self-delivered instance after the kill (checked with sigpending first, so sigwait never blocks).

Adds test_signal_not_swallowed_by_own_group, which fails without the fix. Split out of #13006, which should land after this one; together they should make tests/env/env-signal-handler.sh pass.

send_signal_group sets the signal to SIG_IGN while it kills its own group,
but the kernel only discards an ignored signal that is not blocked. timeout
blocks these signals to consume them with sigwait, so it read back the
signal it had just sent and killed the child with SIGKILL instead of letting
it die on its own. Discard the self-delivered instance after the kill.

Should make test env/env-signal-handler.sh pass
Copilot AI balanced review requested due to automatic review settings November 24, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@xtqqczze

Copy link
Copy Markdown
Collaborator

needs to be rebased

This branch has not been deployed

No deployments
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.

3 participants