From 9559c3471fb28a512d2b326d1642ca915ecc0ac6 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 25 Jul 2022 11:43:55 +0800 Subject: [PATCH] fix: recording process didn't quit --- bin/sc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/sc b/bin/sc index 81385e5..7cbcfaa 100755 --- a/bin/sc +++ b/bin/sc @@ -7,8 +7,9 @@ function _stop killall screenkey 2>/dev/null if test -f /tmp/recording.pid read recpid < /tmp/recording.pid - pkill --signal 15 -g $recpid - rm /tmp/recording.pid + kill -SIGTERM $recpid; + # pkill --signal 15 -g $recpid + and rm /tmp/recording.pid end end @@ -25,7 +26,7 @@ function _start -a x y w h fps -f alsa -i default \ -r $fps -c:v h264 -crf 0 -preset ultrafast \ -c:a aac \ - $outfile & + $outfile > /dev/null 2>&1 /tmp/recording.pid echo $outfile end