From 30f8c087c54c09b69a88eed53e45b48d50104ffd Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 29 Sep 2018 15:52:05 -0400 Subject: [PATCH] ugly but werkable kill script fix --- .scripts/dmenurecord | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.scripts/dmenurecord b/.scripts/dmenurecord index af4117a..75a2f4f 100755 --- a/.scripts/dmenurecord +++ b/.scripts/dmenurecord @@ -15,10 +15,15 @@ updateicon() { \ } killrecording() { - kill -9 "$(cat ~/.recordingpid)" + recpid="$(cat ~/.recordingpid)" + # kill with SIGTERM, allowing finishing touches. + kill -15 "$recpid" rm -f ~/.recordingpid updateicon "" pkill -RTMIN+9 i3blocks + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + kill -9 "$recpid" exit }