From 23fa824899c51eb49c221adb841c762d16238256 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 21 Nov 2022 11:52:52 -0500 Subject: [PATCH 1/2] add `subprocess.CREATE_NEW_PROCESS_GROUP` for Windows Following from looking at this in a discussion around https://github.com/Chia-Network/chia-blockchain/pull/9697. --- src/plotman/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plotman/manager.py b/src/plotman/manager.py index 6066249e..4f85bdd8 100644 --- a/src/plotman/manager.py +++ b/src/plotman/manager.py @@ -263,7 +263,7 @@ def key(key: str) -> job.Phase: # allowing handling of just the log file opening error. if sys.platform == "win32": - creationflags = subprocess.CREATE_NO_WINDOW + creationflags = subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.CREATE_NO_WINDOW nice = psutil.BELOW_NORMAL_PRIORITY_CLASS else: creationflags = 0 From 4236f5ef09e07fbfeeec4564da1667c849e2db0e Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 7 Feb 2023 21:35:18 -0500 Subject: [PATCH 2/2] format --- src/plotman/manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plotman/manager.py b/src/plotman/manager.py index b77488b5..4519dfb5 100644 --- a/src/plotman/manager.py +++ b/src/plotman/manager.py @@ -277,7 +277,9 @@ def key(key: str) -> job.Phase: # allowing handling of just the log file opening error. if sys.platform == "win32": - creationflags = subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.CREATE_NO_WINDOW + creationflags = ( + subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.CREATE_NO_WINDOW + ) nice = psutil.BELOW_NORMAL_PRIORITY_CLASS else: creationflags = 0