Subject: tty ONLCR bug?
To: None <tech-kern@NetBSD.ORG>
From: Gordon W. Ross <firstname.lastname@example.org>
Date: 01/12/1998 16:39:29
I'm looking for hints about how to track down a tty problem,
or even reports of its appearance elsewhere.
The latest GNU readline (2.1) appears to trigger a problem
where the tty layer frequently drops the '\r' that should be
inserted when OCRNL is set in t_oflag. Unfortunately, the
problem appears to be timing-related, and the unreliable '\r'
comes out just fine if I do anything to interfere, such as
stopping the kernel at breakpoints in tty.c, or even just
running my test program under script(1) as opposed to the
pseudo-terminal I'd normally get from telnet.
I've attached a test program below that demonstrates the
problem. I'm pretty sure the test program is doing the
right things in the right order (according to ktrace).
It may be useful to note that it does ioctls (TCSETAW)
to clear ICANON immediately after sending some output.
Any ideas how I might crack this?