Skip to content

DupFileManager: harden detached process spawn with start_new_session - #803

Open
phildapunk wants to merge 1 commit into
stashapp:mainfrom
phildapunk:fix/dupfilemanager-detach-start-new-session
Open

phildapunk wants to merge 1 commit into
stashapp:mainfrom
phildapunk:fix/dupfilemanager-detach-start-new-session

Conversation

@phildapunk

Copy link
Copy Markdown

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 across FileMonitor, DupFileManager, and RenameFile's vendored StashPluginHelper.py copies — spawns the detached child with a plain subprocess.Popen(args). The code already carried a comment flagging that macOS may need start_new_session=True so 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(): pass start_new_session=True when detaching.
  • Bump DupFileManager version 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.

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>
@discourse-stashapp

Copy link
Copy Markdown

This pull request has been mentioned on Stash Forum. There might be relevant details there:

https://discourse.stashapp.cc/t/dupfilemanager/1331/13

@DogmaDragon DogmaDragon added the type:plugin Plugins label Oct 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants