Haven't tested this, but why not use time() to record the time of the first ctrl-c and break only if the next ctrl-c has time()-$previoustime<=2
In reply to Re: Force 2 'ctrl-c's to kill program
by jethro
in thread Force 2 'ctrl-c's to kill program
by albob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |