From e1974793cadce05c98b04b9143017026eb76a5fe Mon Sep 17 00:00:00 2001 From: Kelvin Ly Date: Wed, 2 Nov 2016 09:39:29 -0400 Subject: [PATCH] Add documentation for openpty --- src/pty.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pty.rs b/src/pty.rs index 04fd05b1df..343323b5b5 100644 --- a/src/pty.rs +++ b/src/pty.rs @@ -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, termios: Option) -> Result { let mut slave: libc::c_int = -1;