M
Michael Goerz
Hi,
is there a way to catch if an interrupt (ctrl-c) is called twice in a
certain time window? Catching the first one is done by
$SIG{INT} = \&refresh;
but now I want to detect if the user hits ctrl-c again while that
handler is running (there can be a 'sleep 1' inside the handler to wait
for this), so that the program can exit in that case. As I observed, the
event is not triggered again while the handler is running.
Any suggestions?
Thanks,
Michael Goerz
is there a way to catch if an interrupt (ctrl-c) is called twice in a
certain time window? Catching the first one is done by
$SIG{INT} = \&refresh;
but now I want to detect if the user hits ctrl-c again while that
handler is running (there can be a 'sleep 1' inside the handler to wait
for this), so that the program can exit in that case. As I observed, the
event is not triggered again while the handler is running.
Any suggestions?
Thanks,
Michael Goerz