mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4570] [GUI] Time Skip Stop ends the job's process group on Linux and macOS #5095
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5095
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4570
Author: @Nyarlathoteppppp
Created: 10/29/2026
Status: 🔄 Open
Base:
main← Head:fix/4529-killtree-group📝 Commits (1)
7a6db87timeskip: Stop ends the job's process group on Linux and macOS, not just the job (#4529)📊 Changes
2 files changed (+3 additions, -1 deletions)
View changed files
📝
apps/host/server/timeskip.mjs(+2 -1)📝
apps/host/tests/timeskip-real.test.mjs(+1 -0)📄 Description
Problem and result
killTree()inapps/host/server/timeskip.mjsends the whole tree only on Windows (taskkill /T). On Linux and macOS it signals the job's direct child only, so the revision command the job runs survives Stop.apps/host/tests/timeskip-real.test.mjs("Stop ends the job and everything it started…") already expects the grandchild to end, and fails on main here (macOS) as the issue reports on Linux.After the change Stop ends the job's process group on Linux and macOS, so the revision command ends too.
Related discussion
Fixes #4529. Focused fix, no scope change.
Approach
The same pattern
native-control.mjsalready uses for engines (detached: process.platform !== 'win32'andprocess.kill(-pid, signal)):startDetached(the only child that reacheskillTree, vialive) is started as its own process group on non-Windows;killTreesends SIGTERM to that group, falling back to the child itself if the group kill fails.The Windows branch is unchanged. Nothing is
unref'd; the job's stdio pipes and exit handling are as before. The existing test also checks now thatwhenEndedsettles after Stop, so the detached job still closes its pipes.Validation
Passed:
node --test apps/host/tests/timeskip-real.test.mjs: on46c152a6 pass, 1 fail (the grandchild assertion, after the 6 s poll); with the fix 7/7 pass, 3 runs out of 3.node --test apps/host/tests/timeskip*.test.mjs: 14/14 pass.46c152a.Failed:
none observed.
Not run:
full host suite, Linux, Windows, the desktop app.
Limits
As a group leader the job no longer gets terminal signals sent to the host's group (Ctrl+C on a host started from a terminal), the same as engines started by
native-control.mjs. The host has no Time Skip shutdown cleanup either way.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.