From fe15b49caafb0ed6dbaedeaf934893e947a7067d Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Wed, 21 May 2008 03:03:32 -0500 Subject: make ^C throw an interrupt rather than killing the program if it's received while a command is executing --- bin/te | 1 + 1 file changed, 1 insertion(+) (limited to 'bin') 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; -- cgit v1.2.3-54-g00ecf