Skip to content

Commit 6e33a1a

Browse files
committed
subprocess.Popen - replace preexec_fn=os.setsid with start_new_session=True
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent fabe0ea commit 6e33a1a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ipsframework/services.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def launch(executable: Any, task_name: str, working_dir: str | os.PathLike, *arg
203203
stderr=subprocess_stderr,
204204
cwd=working_dir_path,
205205
text=True,
206-
preexec_fn=os.setsid, # noqa: PLW1509 # TODO - FIX THIS, it is deprecated (https://github.com/python/cpython/issues/82616) (https://docs.astral.sh/ruff/rules/subprocess-popen-preexec-fn/)
206+
start_new_session=True,
207207
env=new_env,
208208
)
209209
except Exception as e:

0 commit comments

Comments
 (0)