console-rs / console

A rust console and terminal abstraction
MIT License
953 stars 113 forks source link

`unix_term::terminal_size` uses `STDIN_FILENO` for `isatty` instead of configured output #185

Closed tgolsson closed 10 months ago

tgolsson commented 1 year ago

For example;

https://github.com/console-rs/console/blob/0567bdcb6a523466586dc9ff0692c2e776f20a5f/src/unix_term.rs#L49-L51

Should likely use out.as_raw_fd() instead. I think the same issue might exist in a few other places in that file that don't currently take a Term at all.