This is the mail archive of the
mailing list for the glibc project.
Any way to get "echoctl" (in stty) support in Linux?
- From: Joe Peterson <joe at skyrush dot com>
- To: libc-alpha at sourceware dot org
- Date: Sat, 14 Apr 2007 10:34:07 -0600
- Subject: Any way to get "echoctl" (in stty) support in Linux?
(please forgive me if this is the wrong forum in which to post this...)
I'm a Linux user, but I recently noticed that on FreeBSD, if I hit
ctrl-C to interrupt a program in a shell, I see "^C". I like this quite
a lot, and I remember this behavior on unices I've used in the past. On
Linux, it does not happen; instead, all you see is an extra new-line
when interrupting a program. One reason I find the echo of "^C" (and
the like) useful is so I can verify whether I've interrupted a process
or if it quit naturally. It's just nice to see confirmation that a
control character was used in a given shell window.
Upon digging, I found that the stty utility (part of coreutils) - and
other parts of the system, I am sure - does not compile with "ECHOCTL"
defined. This is because termios.h does not define it unless
"__USE_MISC" is defined. I am assuming this has to do with the fact
that some of these stty arguments (including echoctl) are not Posix.
This effectively disables the echoctl functionality.
Bottom line is that doing an "stty echoctl" does not achieve the desired
effect (well, at least *my* desired effect). Also, "stty -a" shows by
default that echoctl is set, but of course it does not cause "^C" and
other control characters to echo.
I would really love the option to turn this feature on, and I fear there
is no way to do so in Linux. Anyone know otherwise? I am writing to
the glibc list because it appears that glibc defines the behavior of
__USE_MISC and ECHOCTL in various operating systems. If I am wrong on
this, please let me know. Would it be possible or even a good idea to
re-enable this feature somehow - at least as an option to the user?