Repository navigation
Allow vfork children to signal themselves - #1887
Merged
Merged
Conversation
A vfork child that called kill ended its parent's runner with status 127, so Go's Pdeathsig check, kill(getpid(), sig), killed the parent. Allow kill in the window for the child's own ID only: the signal goes to a new process-directed queue of the child's, under the child's dispositions, mask and init flag. Any other target would go to the broker as the parent's, with the wrong sender and targets, so it fails with a logged EINVAL. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5406de6-bab4-4f3b-b232-ae238032c2c2
A vfork child's pending signals were dropped when its new program started in a fresh runner, while Linux keeps them across execve. Carry them in the startup record and TaskParams as PendingSignalSets: the child's own process-directed queue gives the process set, its private queue the thread set, and signals that lost their siginfo stay without a sender. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5406de6-bab4-4f3b-b232-ae238032c2c2
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89392541-7702-4f61-8b24-b21189a90836
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/vfork-kill
branch
from
November 15, 2026 21:08
5f3c45d to
869237b
Compare
Weidong Cui (wdcui)
marked this pull request as ready for review
November 15, 2026 22:50
|
🤖 SemverChecks 🤖 Click for details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR lets
vforkchildren signal themselves withkill, supporting Go's parent-death check without terminating the parent's runner. Signals use the child's identity and signal state; other targets returnEINVAL. Pending signals surviveexecvewith their process/thread direction, queue order, repeated real-time instances, and fullsiginfopreserved. Tests cover self-signalling, parent isolation, PID-namespace init rules, and signal preservation.