From 404288abbf5cf69b2a49a56ee58403f34375d516 Mon Sep 17 00:00:00 2001 From: FOCUS Date: Mon, 19 Apr 2021 15:46:07 +0200 Subject: [PATCH] keep the frappy server alive when nicos is restarted Popen with start_new_session=True when not in run mode --- base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base.py b/base.py index 69eb955..28f0b4b 100644 --- a/base.py +++ b/base.py @@ -310,7 +310,8 @@ class ServiceManager: proc = subprocess.Popen(cmd.split(), env=env) proc.wait() return - process = subprocess.Popen(cmd.split(), env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + process = subprocess.Popen(cmd.split(), env=env, start_new_session=True, + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) if not port: logger.info('%sstarted: %s', 're' if restart else '', cmd) continue