Closed mgabeler-lee-6rs closed 2 years ago
The CI failure is likely intermittent and will probably be resolved by https://github.com/AlecAivazis/survey/pull/404
OK ... I don't seem to have permission to re-run the CI test to check that, but the tests do pass for me locally
When taking the terminal out of canonical mode, the
VMIN
andVTIME
values become important. The rest of the code in this repo (unsurprisingly) expects the terminal to still operate in blocking read mode. However in some situations, notably in somescreen
sessions (for unknown reasons),VMIN
andVTIME
may be set to 0 initially, which produces a range of errors, most commonly "false" EOF reports, but also sometimes panics.The bug this fixes can be reproduced without messing about with
screen
simply by runningstty min 0 time 0
before running any app that uses this library. A trivial test app I made to debug this issue is available at https://github.com/mgabeler-lee-6rs/survey-screen-eof-demofixes #408 see also https://github.com/cli/cli/issues/4739