diff --git a/screenrecord.sh b/screenrecord.sh index 952df0d..9c4734a 100755 --- a/screenrecord.sh +++ b/screenrecord.sh @@ -27,9 +27,8 @@ pidfile="$XDG_RUNTIME_DIR/screenrecord.pid" filename="$(xdg-user-dir VIDEOS)/ScreenCast_$(date +%F_%T).mp4" isrunning() { - pid=$(2>/dev/null <"$pidfile") + pid=$(cat -- "$pidfile" 2>/dev/null) test $? && kill -s 0 -- "$pid" 2>/dev/null - return $? } usage() {