Fix Linux proxy watcher process lifetime - #21
Merged
Christof Marti (chrmarti) merged 5 commits intoAug 25, 2026
Conversation
Spawn the watcher from its dedicated reader thread so Linux parent-death signaling follows the watcher's lifetime rather than an arbitrary caller thread. Add regression coverage for abrupt parent exit and short-lived caller threads, and direct support requests to microsoft/vscode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Prevents Linux proxy watcher subprocesses from leaking when their owner exits without running Rust destructors.
Changes:
- Spawns watcher commands from a dedicated thread with Linux parent-death signaling.
- Adds regression tests for abrupt process exit and short-lived creator threads.
- Updates platform scoping, dependencies, and support guidance.
Show a summary per file
| File | Description |
|---|---|
SUPPORT.md |
Redirects support requests to microsoft/vscode. |
src/platform/mod.rs |
Restricts the Unix implementation to Linux. |
src/platform/linux.rs |
Implements watcher lifetime handling and tests. |
Cargo.toml |
Adds the Linux-specific libc dependency. |
Cargo.lock |
Records the direct libc dependency. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/5 changed files
- Comments generated: 0
- Review effort level: Balanced
Run the self-reexec parent-death regression only where the test binary is host-compatible, while retaining architecture-independent watcher coverage. Refresh the addon lockfile and generated third-party notices for the direct libc dependency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Mark every non-stdio descriptor close-on-exec before launching dconf or gsettings, with an older-kernel fcntl fallback. Cover the behavior with a regression test using an explicitly inheritable descriptor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the project changelog and align the facade and platform package manifests on version 0.4.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Christof Marti (chrmarti)
force-pushed
the
fix-linux-proxy-watcher-lifetime-v2
branch
from
August 25, 2026 06:51
1336f3f to
6da9fa0
Compare
Christof Marti (chrmarti)
marked this pull request as ready for review
August 25, 2026 06:51
Christof Marti (chrmarti)
enabled auto-merge
August 25, 2026 07:42
Dirk Bäumer (dbaeumer)
approved these changes
Aug 25, 2026
Christof Marti (chrmarti)
deleted the
fix-linux-proxy-watcher-lifetime-v2
branch
August 25, 2026 07:52
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
Prevent Linux proxy watcher processes from surviving their owning process, including shutdown paths where Rust destructors do not run.
This supersedes #20 and preserves the original fix commit authored by PHPLego (@phplego). The follow-up changes:
dconf watch/gsettings monitorfrom the dedicated watcher thread soPR_SET_PDEATHSIGfollows that stable thread instead of whichever caller constructedProxyResolverDropmicrosoft/vscode, since Issues are disabled in this repositoryValidation
cargo fmt --all --checkcargo test --lib --no-default-features --features pac-engine(62 passed)cargo test --lib --no-default-features --features pac-engine watcher_ -- --nocapturecargo clippy --lib --no-default-features --features pac-engine -- -D warnings -A clippy::field-reassign-with-defaultThe existing CI matrix covers GNU/Linux and musl/Alpine targets on x64 and ARM64.