Skip to content

Commit

Permalink
Add documentation for openpty
Browse files Browse the repository at this point in the history
  • Loading branch information
cactorium committed Nov 2, 2016
1 parent 286c3d9 commit e197479
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ pub struct OpenptyResult {
pub slave: RawFd,
}

/// Create a new pseudoterminal, returning the slave and master file descriptors
/// in `OpenptyResult`
/// (see [openpty](http://man7.org/linux/man-pages/man3/openpty.3.html)).
///
/// If `winsize` is not `None`, the window size of the slave will be set to
/// the values in `winsize`. If `termios` is not `None`, the pseudoterminal's
/// terminal settings of the slave will be set to the values in `termios`.
#[inline]
pub fn openpty(winsize: Option<Winsize>, termios: Option<Termios>) -> Result<OpenptyResult> {
let mut slave: libc::c_int = -1;
Expand Down

0 comments on commit e197479

Please sign in to comment.