Skip to content

Commit 93dd7eb

Browse files
authored
Fix Subprocess kwargs (#98)
start_new_session is an argument in fresh python, old use: `preexec_fn = os.setsid`
1 parent 72f3849 commit 93dd7eb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

exec_helpers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"ExecResult",
5252
)
5353

54-
__version__ = "1.9.0"
54+
__version__ = "1.9.1"
5555
__author__ = "Alexey Stepanov"
5656
__author_email__ = "penguinolog@gmail.com"
5757
__maintainers__ = {

exec_helpers/_subprocess_helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
__all__ = ("kill_proc_tree", "subprocess_kw")
2121

22+
import os
2223
import platform
2324

2425
# pylint: disable=unused-import
@@ -58,4 +59,4 @@ def kill_proc_tree(pid, including_parent=True): # type:(int, bool) -> None # p
5859
if "Windows" == platform.system(): # pragma: no cover
5960
subprocess_kw["creationflags"] = 0x00000200
6061
else: # pragma: no cover
61-
subprocess_kw["start_new_session"] = True
62+
subprocess_kw["preexec_fn"] = os.setsid

0 commit comments

Comments
 (0)