diff --git a/plugins/DupFileManager/DupFileManager.yml b/plugins/DupFileManager/DupFileManager.yml index 3d8650b9..bfd10c22 100644 --- a/plugins/DupFileManager/DupFileManager.yml +++ b/plugins/DupFileManager/DupFileManager.yml @@ -1,6 +1,6 @@ name: DupFileManager description: Manages duplicate files. -version: 1.0.2 +version: 1.0.3 url: https://discourse.stashapp.cc/t/dupfilemanager/1331 ui: javascript: diff --git a/plugins/DupFileManager/StashPluginHelper.py b/plugins/DupFileManager/StashPluginHelper.py index 07beba5e..1544e5a9 100644 --- a/plugins/DupFileManager/StashPluginHelper.py +++ b/plugins/DupFileManager/StashPluginHelper.py @@ -481,9 +481,12 @@ def executeProcess(self, args, ExecDetach=False): if self.IS_LINUX: args = ["nohup"] + args self.Trace(f"Executing detached process using Popen({args})") + # start_new_session puts the child in its own session, so it survives the + # parent task process exiting (needed on macOS; harmless on Linux too). + pid = subprocess.Popen(args, start_new_session=True).pid else: self.Trace(f"Executing process using normal Popen({args})") - pid = subprocess.Popen(args).pid # On detach, may need the following for MAC OS subprocess.Popen(args, shell=True, start_new_session=True) + pid = subprocess.Popen(args).pid self.Trace(f"pid={pid}") return pid