Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use is_terminal to implement isatty #2419

Closed
RalfJung opened this issue Jul 22, 2022 · 1 comment · Fixed by #2609
Closed

Use is_terminal to implement isatty #2419

RalfJung opened this issue Jul 22, 2022 · 1 comment · Fixed by #2609
Labels
A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@RalfJung
Copy link
Member

RalfJung commented Jul 22, 2022

Once rust-lang/rust#98070 is available on nightly we might be able to use it to implement the isatty shim. :)

Cc @saethlin

@RalfJung RalfJung added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement A-shims Area: This affects the external function shims labels Jul 22, 2022
@joshtriplett
Copy link
Member

@RalfJung IsTerminal is now available on nightly.

@bors bors closed this as completed in 4e566ec Oct 21, 2022
RalfJung pushed a commit to RalfJung/rust that referenced this issue Oct 22, 2022
Use is_terminal to implement isatty

This means that Linux targets on Windows hosts should give a correct reply. We still don't have an implementation for Windows targets though, that requires some tracking of handles.

Fixes rust-lang/miri#2419

Also restructure our `fs` tests a bit to test the parts that don't need libc separately.

`as_unix_host_fd` is now not used any more, but it could become useful again in the future so I kept it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-shims Area: This affects the external function shims C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants