Function ttyname
Source pub fn ttyname<Fd: AsFd, B: Into<Vec<u8>>>(fd: Fd, reuse: B) -> Result<CString>
Available on crate features termios
and fs
and alloc
only.
Expand description
ttyname_r(fd)
—Returns the name of the tty open on fd
.
If reuse
already has available capacity, reuse it if possible.
On Linux, this function depends on procfs being mounted on /proc.
§References