Lines Matching refs:pty
9 use nix::pty::*;
168 let pty = openpty(None, None).unwrap(); in test_openpty() localVariable
169 assert!(pty.master > 0); in test_openpty()
170 assert!(pty.slave > 0); in test_openpty()
175 write(pty.master, string.as_bytes()).unwrap(); in test_openpty()
176 crate::read_exact(pty.slave, &mut buf); in test_openpty()
183 crate::read_exact(pty.master, &mut buf); in test_openpty()
189 write(pty.slave, string2.as_bytes()).unwrap(); in test_openpty()
190 crate::read_exact(pty.master, &mut buf); in test_openpty()
194 close(pty.master).unwrap(); in test_openpty()
195 close(pty.slave).unwrap(); in test_openpty()
205 let pty = openpty(None, None).unwrap(); in test_openpty_with_termios() localVariable
206 assert!(pty.master > 0); in test_openpty_with_termios()
207 assert!(pty.slave > 0); in test_openpty_with_termios()
208 let termios = tcgetattr(pty.slave).unwrap(); in test_openpty_with_termios()
209 close(pty.master).unwrap(); in test_openpty_with_termios()
210 close(pty.slave).unwrap(); in test_openpty_with_termios()
216 let pty = openpty(None, &termios).unwrap(); in test_openpty_with_termios() localVariable
218 assert!(pty.master > 0); in test_openpty_with_termios()
219 assert!(pty.slave > 0); in test_openpty_with_termios()
224 write(pty.master, string.as_bytes()).unwrap(); in test_openpty_with_termios()
225 crate::read_exact(pty.slave, &mut buf); in test_openpty_with_termios()
231 crate::read_exact(pty.master, &mut buf); in test_openpty_with_termios()
237 write(pty.slave, string2.as_bytes()).unwrap(); in test_openpty_with_termios()
238 crate::read_exact(pty.master, &mut buf); in test_openpty_with_termios()
242 close(pty.master).unwrap(); in test_openpty_with_termios()
243 close(pty.slave).unwrap(); in test_openpty_with_termios()
258 let pty = forkpty(None, None).unwrap(); in test_forkpty() localVariable
259 match pty.fork_result { in test_forkpty()
268 crate::read_exact(pty.master, &mut buf); in test_forkpty()
272 close(pty.master).unwrap(); in test_forkpty()