Function openpt
pub fn openpt(flags: OpenptFlags) -> Result<OwnedFd, Errno> ⓘ
Available on crate feature
dep_rustix
only.Expand description
posix_openpt(flags)
—Open a pseudoterminal device.
On Linux, an additional CLOEXEC
flag value may be passed to request the
close-on-exec flag be set.
On Linux, if the system has no free pseudoterminals available, the
underlying system call fails with io::Errno::NOSPC
, however this rustix
function translates that to io::Errno::AGAIN
, so that the linux_raw and
libc backends have the same behavior.