Repository navigation
DupFileManager: harden detached process spawn with start_new_session - #803
Open
phildapunk wants to merge 1 commit into
Open
phildapunk wants to merge 1 commit into
phildapunk wants to merge 1 commit into
Conversation
executeProcess()'s detach path spawned the child with a plain subprocess.Popen(args), with a comment flagging that macOS may need start_new_session=True to let the child survive the launching task process exiting — but the flag was never actually applied. Split out of stashapp#802 (which found and fixed the same gap in FileMonitor, where it caused a reproducible bug) at the maintainer's request to keep that PR single-plugin; applying the identical fix here proactively since this plugin shares the same vendored StashPluginHelper.py code path. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
This pull request has been mentioned on Stash Forum. There might be relevant details there: |
This branch has not been deployed
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.
Context
Split out of #802 at the maintainer's request to keep that PR scoped to a single plugin.
While fixing #801 (FileMonitor's background service never actually starting on macOS), I found that
executeProcess()'s detach path — shared byte-for-byte acrossFileMonitor,DupFileManager, andRenameFile's vendoredStashPluginHelper.pycopies — spawns the detached child with a plainsubprocess.Popen(args). The code already carried a comment flagging that macOS may needstart_new_session=Trueso the child survives the launching task process exiting, but the flag was never applied.This PR applies the same fix to
DupFileManager's copy proactively. (FileMonitor's copy is fixed in #802, where the gap was actually reproduced and causing a filed bug; this plugin isn't known to be affected, but shares the identical code path.)What this does
executeProcess(): passstart_new_session=Truewhen detaching.DupFileManagerversion 1.0.2 → 1.0.3.LLM-assisted contribution disclosure
Per the repository's contribution policy: this change was prepared with LLM assistance (Claude). The diff has been reviewed by me and I take full responsibility for the change and its license compliance.