(vm: &VirtualMachine)
| 1536 | #[cfg(not(target_os = "redox"))] |
| 1537 | #[pyfunction] |
| 1538 | fn openpty(vm: &VirtualMachine) -> PyResult<(OwnedFd, OwnedFd)> { |
| 1539 | let r = nix::pty::openpty(None, None).map_err(|err| err.into_pyexception(vm))?; |
| 1540 | for fd in [&r.master, &r.slave] { |
| 1541 | super::set_inheritable(fd.as_fd(), false).map_err(|e| e.into_pyexception(vm))?; |
| 1542 | } |
| 1543 | Ok((r.master, r.slave)) |
| 1544 | } |
| 1545 | |
| 1546 | #[pyfunction] |
| 1547 | fn ttyname(fd: BorrowedFd<'_>, vm: &VirtualMachine) -> PyResult { |
nothing calls this directly
no test coverage detected