aboutsummaryrefslogtreecommitdiffstats
path: root/check_trans.pl
diff options
context:
space:
mode:
authorBas Zoetekouw <bas>2008-10-04 19:15:57 +0000
committerBas Zoetekouw <bas>2008-10-04 19:15:57 +0000
commit63cb7838fb3f021e74c9774b1b89f0536bf5c169 (patch)
tree2e73eff6267c353404bfe46fd4fa00cd1fe1b1b8 /check_trans.pl
parent7d3e36ae44edf932da08ce804d28b10e035aeb4e (diff)
Reset the terminal colour when ctrl-c is pressed
CVS version numbers check_trans.pl: 1.80 -> 1.81
Diffstat (limited to 'check_trans.pl')
-rwxr-xr-xcheck_trans.pl13
1 files changed, 12 insertions, 1 deletions
diff --git a/check_trans.pl b/check_trans.pl
index 57df8459cf8..3d0c99f48cd 100755
--- a/check_trans.pl
+++ b/check_trans.pl
@@ -138,6 +138,9 @@ sub verbose;
#== "main"
#==
{
+ # install a signal handler to catch Ctrl-C
+ $SIG{'INT'} = \&handle_INT;
+
my ($language,$file_pattern,%OPT) = parse_cmdargs();
my %translators = read_translators( $language, $OPT{m} );
my %emails_to_send;
@@ -387,7 +390,15 @@ sub verbose
print @_, "\n";
}
-
+#=================================================
+#== handles INT signal
+#==
+sub handle_INT
+{
+ # reset terminal color
+ print color('reset');
+ die( "Interrupted by user" );
+}
#=================================================
#== send out the emails

© 2014-2024 Faster IT GmbH | imprint | privacy policy