Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear input/output buffers on macOS upon TTY open
I don't understand why this works, but it resolves problematic behavior (#49) on macOS. Bisecting history, I found commit 3d6c1b2, which removed flushing the IO buffers for a TTY, was problematic on macOS. However, the test `test_osx_pty_pair` which tests pseudo-ttys with baud_rate 0 on macOS (introduced in b54264b) fails if I simply reintroduced flushing. Therefore, this change now re-introduces flushing the IO buffers upon opening a TTY, but only on macOS and only when baud-rate is non-zero. Thanks to @berkus for the original work.
- Loading branch information