AnyEvent::Util::run_cmd with pty conduit? (fwd)

Marc Lehmann schmorp at schmorp.de
Sat Sep 8 11:52:11 CEST 2012


On Sun, Aug 26, 2012 at 06:40:18PM -0700, Mike Schilli <m at perlmeister.com> wrote:
> 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?

IO::Pty should work just fine together with run_cmd, no extra modules
or options should be required - e.g. passing the slave device handle
to run_cmd will do the trick, if not, you also need to make it the
controlling terminal in the subprocess (by using a code reference and
exec'ing yourself).

For the specific case of ssh, one could also use "sshpass -d... ssh ...".

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the anyevent mailing list