mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-05-17 01:01:27 +08:00
restore terminal to normal state if ctl-c pressed while asking for pass - 1396870
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user