Lines Matching refs:master
26 close(pty.master).expect("closing the master failed");
55 assert!(pty.master > 0);
58 close(pty.master).unwrap();
76 assert!(pty.master > 0);
79 // Write into the master
81 write_all(pty.master, string.as_bytes());
87 close(pty.master).unwrap();
101 assert!(pty.master > 0);
104 close(pty.master).unwrap();
117 assert!(pty.master > 0);
120 // Set the master is in nonblocking mode or reading will never return.
121 let flags = fcntl::fcntl(pty.master, fcntl::F_GETFL).unwrap();
124 fcntl::fcntl(pty.master, fcntl::F_SETFL(new_flags)).unwrap();
126 // Write into the master
128 write_all(pty.master, string.as_bytes());
130 // Try to read from the master, which should not have anything as echoing was disabled.
132 let read = read(pty.master, &mut buf).unwrap_err();
133 close(pty.master).unwrap();