bug report: tty/termios flags weirdness

john hood cgull@glup.org
Sun Nov 15 03:14:10 GMT 2020

After thrashing with my own bugs for a while, I think I've found a minor
bug in Cygwin's tty/termios handling-- seen in 3.1.7 on Windows 10
20H2.  Among other things, this causes tmux to fail on non-pty sessions.


Start Cygwin in conhost or Windows Terminal.

Execute 'stty -isig'

You will probably get an error message 

stty: 'standard input': unable to perform all requested operations

Repeat this test in mintty (or other pty-using sessions, probably)

You will probably not get this error message.

The stty error arises because stty does tcgetattr() after doing
tcsetattr(), and expects the termios struct it reads to be the same as
the one it wrote.  I haven't looked at tmux.

This isn't a big issue for me-- I was doing 'stty raw' which unsets this
flag, but I only needed raw output, so 'stty -opost' was the workaround.



More information about the Cygwin mailing list