From 02bd430baa4f7a9f469571ced10af6723d4b8965 Mon Sep 17 00:00:00 2001 From: boyska Date: Tue, 15 Mar 2022 19:12:59 +0100 Subject: [PATCH] avoid zombies --- ring_mon/apply-state | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ring_mon/apply-state b/ring_mon/apply-state index 096d29d..727e0e4 100755 --- a/ring_mon/apply-state +++ b/ring_mon/apply-state @@ -65,7 +65,10 @@ class LightManager: env = os.environ.copy() env["DEVICE_NUMBER"] = str(self.device_number) - Popen([str(self.args.bin_set_light.resolve()), "on" if on else "off"], env=env) + p = Popen( + [str(self.args.bin_set_light.resolve()), "on" if on else "off"], env=env + ) + p.communicate() def do_waveform(self, status) -> tuple: last_set = None