trap trapfunc SIGWINCH
trapfunc () {
for i in {1..1000}; do
tput cup 0 0
echo OK
done
}
I have used one thousand echoes only to assure error raising every time.
But you can use one hundred instead, and you will see the error raise
more rarely
Probably error raise (very very rarely) with only one echo too...
I think the error raise when read -t expire, and, at the same time, the
user have maximized his window and are writing something in SIGWINCH trap
If I'm on error, please let me know
best regards