From 111da30d0b3005fbf50e455514d3dbebd092343d Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 24 Dec 2023 20:50:13 -0700 Subject: [PATCH] Fix killing executable --- remarkable_sim/sim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remarkable_sim/sim.py b/remarkable_sim/sim.py index a77e2d7..13f4158 100644 --- a/remarkable_sim/sim.py +++ b/remarkable_sim/sim.py @@ -201,8 +201,7 @@ def __init__(self, root, display_scale, executable): self.fifo_button = makefifo(path_fifo_button) if executable is not None: - # prepend exec so that executable inherits shell process and can be killed - self.subprocess = subprocess.Popen('exec ' + executable, shell=True) + self.subprocess = subprocess.Popen(executable) else: self.subprocess = None @@ -331,6 +330,7 @@ def main(): if gui.subprocess is not None: gui.subprocess.terminate() + gui.subprocess.wait() os.remove(path_fifo_stylus) os.remove(path_fifo_touch) os.remove(path_fifo_button)