Repository navigation
feat(core-manager): share a host stop strategy with core supervisors - #475
Merged
Merged
Conversation
Changed Files
|
A host ending the OS session needs the core's process tree killed instead of stopped through the Windows Ctrl+C helper, which cannot start while the session is torn down. CoreManagerBuilder::stop_strategy threads one Arc<AtomicStopStrategy> to every supervisor, so a later store reaches running and future instances. Without it the stop stays graceful. Refs libnyanpasu/clash-nyanpasu#6054
4o3F
force-pushed
the
fix/core-stop-strategy
branch
from
November 1, 2026 12:25
aa0f425 to
7fe429b
Compare
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.
Builds on libnyanpasu/nyanpasu-utils#219 (merged): the utils gitlink pins
main@6d3574e, which addsStopStrategy(defaultGraceful) /AtomicStopStrategy/SupervisorBuilder::stop_strategy.CoreManagerBuilder::stop_strategy(Arc<AtomicStopStrategy>), injected likenative_store.Arcis threaded throughProcessRuntimeBackendandInstanceBuilderinto eachSupervisorBuilder, so a laterstore(Kill)reaches running and future instances. Without it nothing is passed and stops stay graceful.nyanpasu_service, service-runtime and IPC are untouched, so the shipped service binary does not change and no release is needed.Test:
manager_shares_stop_strategy_with_running_and_future_instancesstoresKillbetween instance starts and checks stop succeeds, processes exit and ports are released; on Windows it also asserts the shutdown helper is never launched.Verified on Linux:
cargo fmt --all --check,cargo clippy -p nyanpasu-core-manager --all-targets -D warnings,cargo test -p nyanpasu-core-manager,cargo check --workspace --all-targets. Not run on Windows.Refs libnyanpasu/clash-nyanpasu#6054