* [PATCH] echo ctrl characters on INTR/QUIT/SUSP
@ 2007-12-04 14:19 Joe Peterson
0 siblings, 0 replies; only message in thread
From: Joe Peterson @ 2007-12-04 14:19 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
The stty setting, "echoctl", directs the tty to echo control characters
as a normal letter prefixed by "^" (such as "^C" for the default INTR
setting). Linux does not currently echo for the INTR/QUIT/SUSP signals,
whereas all other "unix" variants I have used over the years do, to my
recollection anyway (I recently tested: Solaris, BSD, Mac OS X). I find
this a really nice feature, since it becomes very clear at a glance that
a terminal process was interrupted explicitly rather than finishing
normally (when I am running many things in different windows, it's nice
to verify which ones I interrupted). It's just nice to see that echo
for positive feedback, and it seems to be standard OS behavior.
If you try this patch and don't see the echo, make sure echoctl is on
("stty echoctl"). I have applied this patch to 2.6.22 in my tests. I
welcome feedback, as I have not seen this issue addressed before.
Please cc me at my address above on replies.
Thanks, Joe
[-- Attachment #2: gentoo-sources-2.6.22-echoctl.patch --]
[-- Type: text/plain, Size: 336 bytes --]
--- linux-2.6.22-gentoo-r9.old/drivers/char/n_tty.c 2007-12-03 16:25:05.000000000 -0700
+++ linux-2.6.22-gentoo-r9/drivers/char/n_tty.c 2007-12-03 21:58:44.000000000 -0700
@@ -761,6 +761,9 @@
if (c == SUSP_CHAR(tty)) {
send_signal:
isig(signal, tty, 0);
+ if (L_ECHO(tty)) {
+ echo_char(c, tty);
+ }
return;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-04 14:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-04 14:19 [PATCH] echo ctrl characters on INTR/QUIT/SUSP Joe Peterson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox