Add sigint trap

This commit is contained in:
aclist authored and GitHub committed 2022-01-21 05:44:23 +09:00
1 parent 296185a728
commit 9685bff75a
1 file changed
+6
+6
View File
@@ -291,6 +291,11 @@ exit_msg(){
printf "DZTUI $version\n"
exit
}
forced_exit(){
tput cnorm
printf "\n"
exit_msg
}
main(){
checks
init_table
@@ -315,4 +320,5 @@ main(){
fi
done
}
trap forced_exit INT
main