• Home
  • Raw
  • Download

Lines Matching refs:pty

6 use nix::pty::openpty;
24 let pty = openpty(None, None).expect("openpty failed"); in test_tcgetattr_pty() localVariable
25 assert!(termios::tcgetattr(pty.slave).is_ok()); in test_tcgetattr_pty()
26 close(pty.master).expect("closing the master failed"); in test_tcgetattr_pty()
27 close(pty.slave).expect("closing the slave failed"); in test_tcgetattr_pty()
53 let pty = openpty(None, None).expect("openpty failed"); in test_output_flags() localVariable
54 assert!(pty.master > 0); in test_output_flags()
55 assert!(pty.slave > 0); in test_output_flags()
56 let termios = tcgetattr(pty.slave).expect("tcgetattr failed"); in test_output_flags()
57 close(pty.master).unwrap(); in test_output_flags()
58 close(pty.slave).unwrap(); in test_output_flags()
70 let pty = openpty(None, &termios).unwrap(); in test_output_flags() localVariable
71 assert!(pty.master > 0); in test_output_flags()
72 assert!(pty.slave > 0); in test_output_flags()
76 write_all(pty.master, string.as_bytes()); in test_output_flags()
80 crate::read_exact(pty.slave, &mut buf); in test_output_flags()
82 close(pty.master).unwrap(); in test_output_flags()
83 close(pty.slave).unwrap(); in test_output_flags()
95 let pty = openpty(None, None).unwrap(); in test_local_flags() localVariable
96 assert!(pty.master > 0); in test_local_flags()
97 assert!(pty.slave > 0); in test_local_flags()
98 let termios = tcgetattr(pty.slave).unwrap(); in test_local_flags()
99 close(pty.master).unwrap(); in test_local_flags()
100 close(pty.slave).unwrap(); in test_local_flags()
111 let pty = openpty(None, &termios).unwrap(); in test_local_flags() localVariable
112 assert!(pty.master > 0); in test_local_flags()
113 assert!(pty.slave > 0); in test_local_flags()
116 let flags = fcntl::fcntl(pty.master, fcntl::F_GETFL).unwrap(); in test_local_flags()
118 fcntl::fcntl(pty.master, fcntl::F_SETFL(new_flags)).unwrap(); in test_local_flags()
122 write_all(pty.master, string.as_bytes()); in test_local_flags()
126 let read = read(pty.master, &mut buf).unwrap_err(); in test_local_flags()
127 close(pty.master).unwrap(); in test_local_flags()
128 close(pty.slave).unwrap(); in test_local_flags()