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

Function set_controlling_tty

crates/openshell-supervisor-process/src/ssh.rs:1088–1094  ·  view source on GitHub ↗
(fd: RawFd)

Source from the content-addressed store, hash-verified

1086 // cross-platform conversion so the same expression compiles everywhere.
1087 #[allow(clippy::useless_conversion)]
1088 fn set_controlling_tty(fd: RawFd) -> std::io::Result<()> {
1089 let rc = unsafe { libc::ioctl(fd, libc::TIOCSCTTY.into(), 0) };
1090 if rc != 0 {
1091 return Err(std::io::Error::last_os_error());
1092 }
1093 Ok(())
1094 }
1095
1096 #[allow(unsafe_code)]
1097 #[cfg_attr(

Callers 1

install_pre_execFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected