From 5428b146e1bb6ac229b7c5c2ad28775efb74db3d Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Wed, 5 Feb 2025 14:43:01 -0500 Subject: [PATCH] detach the command --- pioreactor/utils/networking.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pioreactor/utils/networking.py b/pioreactor/utils/networking.py index 4454b4df..0edc3123 100644 --- a/pioreactor/utils/networking.py +++ b/pioreactor/utils/networking.py @@ -15,8 +15,9 @@ def ssh(address: str, command: str): try: + detached_command = f"nohup {command} > /dev/null 2>&1 &" subprocess.run( - ["ssh", "-o", "ConnectTimeout=5", address, command], + ["ssh", "-o", "ConnectTimeout=5", address, detached_command], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,