use killall to find the bastid

workspace
Brendan Howell 8 years ago
parent 1fe5f50781
commit 666f6fc690

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

Loading…
Cancel
Save