pub fn terminal_size(fd: &impl AsRawFd) -> Option<PtySize>Expand description
Query the window size of the terminal backing fd.
Returns None when fd is not a terminal (for example a pipe or a file, as under CI or output redirection)
or the TIOCGWINSZ query fails.
Callers use a None result to decide that no PTY should be allocated.