Skip to contentSkip to conversation

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

PATCH New Steven Rostedt 1 participant 1 message Jan 18, 2023 Ktest

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

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

From: Steven Rostedt <[email protected]>

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.

---
 tools/testing/ktest/ktest.pl | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/ktest/ktest.pl +3 -0
index f2f48ce6ac4d..78249c3a03a5 100755
@@ -4205,6 +4205,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",
Signature · 1 line
2.39.0