MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / set_winsize

Function set_winsize

crates/openshell-supervisor-process/src/ssh.rs:1076–1082  ·  view source on GitHub ↗
(fd: RawFd, winsize: Winsize)

Source from the content-addressed store, hash-verified

1074
1075 #[allow(unsafe_code)]
1076 pub fn set_winsize(fd: RawFd, winsize: Winsize) -> std::io::Result<()> {
1077 let rc = unsafe { libc::ioctl(fd, libc::TIOCSWINSZ, &winsize) };
1078 if rc != 0 {
1079 return Err(std::io::Error::last_os_error());
1080 }
1081 Ok(())
1082 }
1083
1084 #[allow(unsafe_code)]
1085 // `libc::TIOCSCTTY` is `u32` on macOS/BSD and `u64` on Linux; allow the

Callers 2

window_change_requestMethod · 0.85

Calls

no outgoing calls

Tested by 1