From 666f6fc690b7aa3782f6d6f15820ed4d90533d99 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Fri, 5 May 2017 00:32:36 +0200 Subject: [PATCH] use killall to find the bastid --- screenless/bureau/photography/photography.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/screenless/bureau/photography/photography.py b/screenless/bureau/photography/photography.py index ab4d820..305b825 100644 --- a/screenless/bureau/photography/photography.py +++ b/screenless/bureau/photography/photography.py @@ -73,8 +73,9 @@ class Photography(Bureau): #proc = subprocess.Popen(cmd, shell=True, env={"LD_LIBRARY_PATH": mjpg_dir}) proc = subprocess.Popen(cmd) time.sleep(2) - proc.send_signal(signal.SIGINT) - time.sleep(1) + killer_cmd = "killall -s SIGINT mjpg_streamer" + subprocess.Popen(killer_cmd.split()) + time.sleep(2) # copy last image to the tmpfile filelist = os.listdir("/tmp/webcam")