Created attachment 96681 [details] the fix If icanon changes while read() is sleeping, the exit parameters, such as the timeouts and minimum number of chars to read, should be re-calculated. The problem is most prominent when pty master changes termios between writes, while the reader is waiting for data on slave.