Function openpty::openpty[][src]

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");