diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-21 03:03:32 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-21 03:03:32 -0500 |
commit | fe15b49caafb0ed6dbaedeaf934893e947a7067d (patch) | |
tree | 0ec9447138679db1c8cb2e997697ca9efa0204d8 | |
parent | 809ff91e1b2e88943d9012b0ea2441079a5038aa (diff) | |
download | language-teco-fe15b49caafb0ed6dbaedeaf934893e947a7067d.tar.gz language-teco-fe15b49caafb0ed6dbaedeaf934893e947a7067d.zip |
make ^C throw an interrupt rather than killing the program if it's received while a command is executing
-rw-r--r-- | bin/te | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -32,6 +32,7 @@ COMMAND: while (1) { if ($pc eq "\e") { print "\n"; ReadMode 3; + local $SIG{INT} = sub { die "interrupted!" }; eval { $te->execute($command) }; print "ERROR: $@\n" if $@; ReadMode 4; |