restore terminal to normal state if ctl-c pressed while asking for pass - 1396870

This commit is contained in:
Frank Cizmich
2014-11-28 13:49:11 -02:00
parent 01f8102623
commit 2fb93db909
+4
View File
@@ -10485,6 +10485,10 @@ sub sig_int {
my ( $signal ) = @_;
$oktorun = 0; # flag for cleanup tasks
print STDERR "# Exiting on SIG$signal.\n";
# restore terminal to normal state in case CTL-C issued while asking for password
# https://bugs.launchpad.net/percona-toolkit/+bug/1396870
use Term::ReadKey;
ReadMode 0;
exit 1;
}