ktest.pl: Give back console on Ctrt^C on monitor

commit 83d29d439cd3ef23041570d55841f814af2ecac0 upstream.

When monitoring the console output, the stdout is being redirected to do
so. If Ctrl^C is hit during this mode, the stdout is not back to the
console, the user does not see anything they type (no echo).

Add "end_monitor" to the SIGINT interrupt handler to give back the console
on Ctrl^C.

Cc: stable@vger.kernel.org
Fixes: 9f2cdcbbb9 ("ktest: Give console process a dedicated tty")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Steven Rostedt
2023-01-18 16:32:13 -05:00
committed by Greg Kroah-Hartman
parent 3ae006eff1
commit 5bf5ec2296

View File

@@ -4243,6 +4243,9 @@ sub send_email {
} }
sub cancel_test { sub cancel_test {
if ($monitor_cnt) {
end_monitor;
}
if ($email_when_canceled) { if ($email_when_canceled) {
send_email("KTEST: Your [$test_type] test was cancelled", send_email("KTEST: Your [$test_type] test was cancelled",
"Your test started at $script_start_time was cancelled: sig int"); "Your test started at $script_start_time was cancelled: sig int");