Repository navigation
Fix missed signals between fork/exec - #885
Draft
WilliamRoebuck wants to merge 5 commits into
Draft
WilliamRoebuck wants to merge 5 commits into
WilliamRoebuck wants to merge 5 commits into
Conversation
This reverts commit 40da3db.
WilliamRoebuck
requested a deployment
to
workflow-approval
October 28, 2026 10:44 — with
GitHub Actions
Waiting
WilliamRoebuck
requested a deployment
to
workflow-approval
October 28, 2026 10:44 — with
GitHub Actions
Waiting
WilliamRoebuck
requested a deployment
to
workflow-approval
October 28, 2026 10:44 — with
GitHub Actions
Waiting
WilliamRoebuck
requested a deployment
to
workflow-approval
October 28, 2026 10:44 — with
GitHub Actions
Waiting
Contributor
|
Documentation preview for this pull request is available at: |
This branch is waiting to be deployed
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.
Signal handlers are inherited across
forks, but notexecs. The child process receiving a signal attempts to use LM's signal handlers (I think), but this results in the signal being dropped.The failure was possible to induce by artificially delaying the
execcall and requesting a termination during that time (see 40da3db). The result was that SIGTERM was ignored and some "failed to send SIGKILL" logs appeared until the process was finally terminated.The fix is to temporarily block signals (SIGTERM and SIGINT) before the fork, reset the signal handlers in the child, and then unblock them.
Some functions had to be extracted to keep code readable.
To do: