avoid zombies

This commit is contained in:
boyska 2022-03-15 19:12:59 +01:00
parent 68e6805bd9
commit 02bd430baa

View file

@ -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