MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / isatty

Function isatty

src/termios/tty.rs:22–24  ·  view source on GitHub ↗
(fd: Fd)

Source from the content-addressed store, hash-verified

20/// [Linux]: https://man7.org/linux/man-pages/man3/isatty.3.html
21#[inline]
22pub fn isatty<Fd: AsFd>(fd: Fd) -> bool {
23 backend::termios::syscalls::isatty(fd.as_fd())
24}
25
26/// `ttyname_r(fd)`—Returns the name of the tty open on `fd`.
27///

Callers 2

test_ttyname_okFunction · 0.50
showFunction · 0.50

Calls 1

as_fdMethod · 0.45

Tested by 1

test_ttyname_okFunction · 0.40