From 86169d0080ea4da02407b077841a616c379a347f Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 6 Jul 2009 21:16:51 -0500 Subject: aha, echo was off by default on spawned processes --- lib/App/Termcast.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/App/Termcast.pm b/lib/App/Termcast.pm index a5bf717..c0e7077 100644 --- a/lib/App/Termcast.pm +++ b/lib/App/Termcast.pm @@ -52,6 +52,11 @@ sub run { my $pty = IO::Pty::Easy->new; $pty->spawn(@argv); + my $termios = POSIX::Termios->new; + $termios->getattr(fileno($pty->{pty})); + my $lflag = $termios->getlflag; + $termios->setlflag($lflag | POSIX::ECHO); + $termios->setattr(fileno($pty->{pty}), POSIX::TCSANOW); my ($rin, $rout) = ''; vec($rin, fileno(STDIN) ,1) = 1; -- cgit v1.2.3-54-g00ecf