about summary refs log tree commit diff
path: root/library/std/src/sys/io/is_terminal/hermit.rs
blob: 61bdb6f0a5440aea28dfce8f5e31a3333fa0e352 (plain)
1
2
3
4
5
6
use crate::os::fd::{AsFd, AsRawFd};

pub fn is_terminal(fd: &impl AsFd) -> bool {
    let fd = fd.as_fd();
    hermit_abi::isatty(fd.as_raw_fd())
}