stty: use stdin for TTY operations instead of /dev/tty#9881
stty: use stdin for TTY operations instead of /dev/tty#9881sylvestre merged 3 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
|
Thanks for working on this. I wanted to have a look at this myself and basicly came up with the same approach (drop opening I tested this with Ubuntu 25.10 live and the rebuild I think the problem I'm seeing is #8474 / nix-rust/nix#2672. |
|
TIL that the error message in this case can be three separate things based on whether its musl, android: It makes it look like I'm hardcoding the error message but actually its all based on the ENOTTY localization being so different |
|
@ChrisDryden thanks for taking care. I'll test again once a fix for #8474 is in. |
|
@ChrisDryden I can verify that NetBeans is fixed with this and #10072. I built from current main branch and replaced |
|
Thank you! |
* stty: use stdin for TTY operations instead of /dev/tty * Add tests for stty stdin behavior and fix platform-specific error messages --------- Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Detailed comments of how this came up in #8608
It turns out that the cause of a bunch of bugs that we have been seeing with stty compared to GNU have been caused by us defaulting to /dev/tty and stdout instead of stdin. This shows up in the stty -g output being different, differences in error messaging and differences related to how stty is able to parse piped input.
I added a bunch of integration test cases from the original errors: #8016 to make sure that we aren't regressing with this change and to address the reason this code was added in the first place.