On Mon, 29 Dec 2008, Frans Pop wrote:
> I have no idea. I'm not all that familiar with terminal stuff.
> Google tells me that stty does have command line options to change the
> case of output.
Indeed: stty LCASE
(can be reverted with stty -LCASE)
> Any suggestions how we could debug this?
If the same system call is causing this change then:
strace -f -v -e trace=ioctl
In the analysis, you must find out who was the culprit doing:
ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {C_IFLAGS=0X6F02, C_OFLAGS=0X7,
C_CFLAGS=0X4BF, C_LFLAGS=0X8A3F, C_LINE=0,
C_CC="\X03\X1C\X7F\X15\X04\X00\X01\XFF\X11\X13\X1A\XFF\X12\X0F\X17\X16\XFF\X00\X00"})
= 0
The important part it "TCSETSW" and probably the fact that C_OFLAGS got
modified to include bit 1 (0x2 in the binary decomposition). Strangely in my
case: setting LCASE also modified bits in IFLAGS and LFLAGS since the previous
TCGETS returned:
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x6d02, c_oflags=0x5,
c_cflags=0x4bf, c_lflags=0x8a3b, c_line=0,
c_cc="\x03\x1c\x7f\x15\x04\x00\x01\xff\x11\x13\x1a\xff\x12\x0f\x17\x16\xff\x00\x00"})
= 0
Man termios has details on all those fields and in particular for c_oflags:
OLCUC (not in POSIX) Map lowercase characters to uppercase on output.
And in /usr/include/bits/termios.h:
#define OLCUC 0000002
Cheers,
--
Raphaël Hertzog
Le best-seller français mis à jour pour Debian Etch :
http://www.ouaza.com/livre/admin-debian/
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]