mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 21:32:36 +01:00
Add sigint trap
This commit is contained in:
parent
296185a728
commit
9685bff75a
1 changed files with 6 additions and 0 deletions
6
dztui.sh
6
dztui.sh
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue