Browse Source

avoid zombies

boyska 2 years ago
parent
commit
02bd430baa
1 changed files with 4 additions and 1 deletions
  1. 4 1
      ring_mon/apply-state

+ 4 - 1
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