AnyEvent::Util::run_cmd with pty conduit?

Mike Schilli anyevent at perlmeister.com
Wed Aug 22 02:47:06 CEST 2012


I'm running a command with AnyEvent::Util::run_cmd that detects if it's
running in a tty or not, and suppresses its output if not.

In the POE world, you can resolve this by using POE::Wheel::Run's "pty"
conduit:

"The "pty" conduit type runs the child process under a pseudo-tty, which
is created by IO::Pty.  Pseudo-ttys (ptys) convince child processes that
they are interacting with terminals rather than pipes.  This may be used
to trick programs like ssh into believing it’s secure to prompt for
a password, although passphraseless identities might be better for that.
(perldoc  POE::Wheel::Run)

Is there a similar solution for run_cmd in AnyEvent::Util or what's the
easiest way to convince the command that it's runnnig in a p/tty?

-- 
-- Mike

anyevent at perlmeister.com


More information about the anyevent mailing list