Re: Is it possible to catch Ctrl-C keystroke?



In article <b53a39dc-d309-4c86-b4d7-6fce803e89cd@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Bezoar <cwjolly@xxxxxxxxx> wrote:
On Jun 27, 8:41 pm, "palm...@xxxxxxxxx" <palm...@xxxxxxxxx> wrote:
On Jun 28, 3:26 am, Victor <vhnguy...@xxxxxxxxx> wrote:

Hi,

While running a TCL script, if someone hits Ctrl-C, does anyone know
if there is a way to capture such Ctrl-C character (so my script can
do some minimum cleanup job first before quitting)?
.
.
.
On unix for sure you can use the Tclx extension to handle the SIGINT
signal that results from a Ctrl-C.
I also remember someone created a signals extension; google that. You
can also use Expect extension to
catch input from user ( interact ) using \003 as the regexp .

Carl

Some of these claims are at least potentially misleading.
<URL: http://wiki.tcl.tk/1886 > has more details. I sum-
marize: yes, on Unix it's good to approach this problem
in terms of signals.
.