improve terminating processes on error

This commit is contained in:
Jörg Thalheim
2024-10-10 17:24:25 +02:00
parent d97bda9c0d
commit 71e7ecd49c
3 changed files with 45 additions and 19 deletions

View File

@@ -122,10 +122,7 @@ def zerotier_controller() -> Iterator[ZerotierController]:
str(home),
]
with subprocess.Popen(
cmd,
preexec_fn=os.setsid,
) as p:
with subprocess.Popen(cmd, start_new_session=True) as p:
process_group = os.getpgid(p.pid)
try:
print(