diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2023-01-19 00:32:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 11:34:26 +0300 |
commit | 76c2ecaf570a0a752586f324f81610c37340701d (patch) | |
tree | 9c6ed311502063ef1af8bdce02890fe9a5d0a431 | |
parent | 71946389a765d68df48a343eb70da892c9075f16 (diff) | |
download | linux-76c2ecaf570a0a752586f324f81610c37340701d.tar.xz |
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: 9f2cdcbbb90e7 ("ktest: Give console process a dedicated tty")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 1737c59e4ff6..56620c3fea04 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4193,6 +4193,9 @@ sub send_email { } sub cancel_test { + if ($monitor_cnt) { + end_monitor; + } if ($email_when_canceled) { my $name = get_test_name; send_email("KTEST: Your [$name] test was cancelled", |