Lines Matching refs:slave
38 // Get the name of the slave
55 // Get the name of the slave
72 // Get the name of the slave
93 // Get the name of the slave
106 // Allow a slave to be generated for it
110 // Get the name of the slave
113 // Open the slave device
141 let slave = unsafe { File::from_raw_fd(slave_fd) };
143 (master, slave)
146 /// Test opening a master/slave PTTY pair
150 /// master/slave PTTY pair, then just sanity-check the raw values.
153 let (master, slave) = open_ptty_pair();
155 assert!(slave.as_raw_fd() > 0);
168 let (mut master, mut slave) = open_ptty_pair();
169 make_raw(slave.as_raw_fd());
172 slave.write_all(b"hello").unwrap();
177 slave.write_all(b"hello").unwrap();
185 let (mut master, mut slave) = open_ptty_pair();
186 make_raw(slave.as_raw_fd());
190 slave.read_exact(&mut buf).unwrap();
195 slave.read_exact(&mut buf).unwrap();
206 assert!(pty.slave > 0);
212 crate::read_exact(pty.slave, &mut buf);
225 write(pty.slave, string2.as_bytes()).unwrap();
231 close(pty.slave).unwrap();
243 assert!(pty.slave > 0);
244 let termios = tcgetattr(pty.slave).unwrap();
246 close(pty.slave).unwrap();
255 assert!(pty.slave > 0);
261 crate::read_exact(pty.slave, &mut buf);
273 write(pty.slave, string2.as_bytes()).unwrap();
279 close(pty.slave).unwrap();