summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-05-21 03:03:32 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-05-21 03:03:32 -0500
commitfe15b49caafb0ed6dbaedeaf934893e947a7067d (patch)
tree0ec9447138679db1c8cb2e997697ca9efa0204d8
parent809ff91e1b2e88943d9012b0ea2441079a5038aa (diff)
downloadlanguage-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/te1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/te b/bin/te
index 0e3afcd..c79222b 100644
--- a/bin/te
+++ b/bin/te
@@ -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;