Philip Guenther <guent...@gmail.com> wrote: > Ha! I believe this bug is a result of posix_openpt() being > implemented in 5.3 and the luit configure script picking that instead > of openpty(), as the code for the former results in the client side > being opened (by PTMGET), then closed, then reopened by name, which > leaves a window where the master will read EOF.
>From the ktraces, it appears that in the parent luit, select() says an fd is ready for reading, but the read() returns EOF, and luit exits. If this is due to a race, then I don't see why only OpenBSD should be affected. The switch to openpty() has fixed this, but there is still another problem. Try something like this: $ while true; do luit -encoding ISO8859-2 -- ls; done Sometimes, luit will hang (stuck in select) and only exit when it can read a character from the tty (i.e., you press a key). ... And on my amd64, where I couldn't reproduce this before matthieu's patch, I now still don't get hangs, but screwed up termios settings-- most obviously onlcr is lost. Damn, I didn't realize luit was that buggy. The X.org version is effectively unmaintained. We should consider switching to Thomas Dickey's, who I think will be rather more interested in hearing about these bugs, if he hasn't fixed them already. -- Christian "naddy" Weisgerber na...@mips.inka.de