extern crate pty_shell;
use pty_shell::*;
struct Shell;
impl PtyHandler for Shell {
fn input(&mut self, input: &[u8]) {
}
fn output(&mut self, output: &[u8]) {
}
fn resize(&mut self, winsize: &winsize::Winsize) {
}
fn shutdown(&mut self) {
}
}
fn main() {
let child = tty::Fork::from_ptmx().unwrap();
child.exec("bash");
child.proxy(Shell);
child.wait();
}