Pass PTY slave as test program stdio
This commit is contained in:
parent
6e9938c5fc
commit
b903788696
@ -68,7 +68,14 @@ fn main() {
|
||||
|
||||
let mut pty = File::open("/dev/ptmx").unwrap();
|
||||
|
||||
Command::new("/bin/pts_tester").spawn().unwrap();
|
||||
let pts = File::open("/dev/pts0").unwrap();
|
||||
|
||||
Command::new("/bin/pts_tester")
|
||||
.stdin(pts.try_clone().unwrap())
|
||||
.stdout(pts.try_clone().unwrap())
|
||||
.stderr(pts)
|
||||
.spawn()
|
||||
.unwrap();
|
||||
|
||||
let mut kbd_buf = [0u8; 512];
|
||||
let mut pty_buf = [0u8; 512];
|
||||
|
Loading…
Reference in New Issue
Block a user