Skip to content

Fix missed signals between fork/exec - #885

Draft
WilliamRoebuck wants to merge 5 commits into
eclipse-score:mainfrom
etas-contrib:feature/fix-missed-signals
Draft

WilliamRoebuck wants to merge 5 commits into
eclipse-score:mainfrom
etas-contrib:feature/fix-missed-signals

Conversation

@WilliamRoebuck

Copy link
Copy Markdown
Contributor

Signal handlers are inherited across forks, but not execs. 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 exec call 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:

  • Add tests for new functions and syscall failures to prevent coverage drop

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-885: https://eclipse-score.github.io/lifecycle/pr-885/

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — 0e07ab42 Waiting Oct 28, 2026 by WilliamRoebuck via Build and test x86_64-qnx / approval #1871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant