Function openpty

Source
pub fn openpty(
    termios: Option<&termios>,
    winsize: Option<&winsize>,
    name: Option<String>,
) -> Result<(File, File, String), Box<dyn Error>>
Expand description

Creates a new pseudo terminal in /dev/pts/ and returns the name and the master / slave file descriptors.

ยงExamples

let (master, slave, name) = openpty::openpty(None, None, None)
    .expect("Creating pty failed");