1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-29 13:52:03 +01:00

Add sigint trap

This commit is contained in:
aclist 2022-01-21 05:44:23 +09:00 committed by GitHub
parent 296185a728
commit 9685bff75a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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