fix: avoid reaping unrelated processes from stale PID files - #21
Open
Nishef1 wants to merge 1 commit into
Open
Conversation
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.
Summary
Harden crash-recovery cleanup so a stale
aether.pidfile cannot cause Aether-GUI to terminate an unrelated process after the operating system reuses the recorded PID.Problem
The current startup cleanup treats a surviving PID file plus a live PID as sufficient proof that the process still belongs to Aether. PIDs are reusable, so after a crash and enough time, the same PID can belong to a completely different process.
In that situation the existing cleanup path can issue
taskkill /Fon Windows orkill -9on Unix against a process Aether-GUI does not own.Changes
aether.exeon Windows,aetheron Unix)tasklist/taskkillchecksWhy
A PID file is a useful recovery hint, but it is not durable proof of process ownership. Verifying process identity before destructive cleanup narrows the operation to the process Aether-GUI actually expects to own.
Scope
This PR changes only orphan-process recovery. It does not change connection establishment, tunnel behavior, route discovery, retry policy, or profile handling.
Validation
mainat9ba2ef0: one commit, one changed Rust fileA Rust toolchain was not available in the connector environment used to prepare this branch, so
cargo fmt,cargo clippy, and the Rust tests still need to be run before marking the PR ready for review.