From: Dave S. <kin...@ya...> - 2003-07-31 22:38:13
|
Thanks I'm trying to install this module now, though I'm running into some dependency issues. Can I ask you some questions in the mean time? 1) How does the SSH module operate when I call commands that take a long time to run, and have a lot of output (i.e. cat'ing a large file). Will the 'cmd' subroutine time out ever? Will it be able to return that much data in the return value list? 2) Can I add in a timeout value to the 'cmd', such that it will never wait longer than x seconds for a command to complete. This is useful for some of my tests, which can often get hung if there's a bug in them. Thanks, Dave --- Chris Snyder <cas...@pe...> wrote: > You might want to look at using Net::SSH instead. > > > At 12:08 PM 7/31/2003 -0700, you wrote: > >Hi! > > > >I really need some help, and am so glad that I've > >finally found this discussion group! > > > >I am using Perl and Expect to manage a simple test > >infrastructure at my company. Every so often a cron > >job fires off a Perl script. That script then > executes > >other Perl scripts, which monitor tests via Expect. > >Most of those scripts start out by calling > >Expect->spawn("ssh"), to ssh to another machine and > >run/monitor their specific test. > > > >Occasionally though, Expect's spawn routine dies > with > >one of two errors, both of which come from the > Pty.pm > >module. I can't figure out what they mean or how to > >fix them though, which is driving me batty! > > > >1) "Cannot open a pty". > > This comes from a failure of the pty_allocate > >function, in the "new" subroutine of Pty.pm. My > Pty.pm > >is version 1.02. I cannot find the "pty_allocate" > >subroutine in any .pm or .pl file on my system, so > I > >don't know why it is failing sometimes. > > > >2) "Error: could not connect pty as controlling > >terminal!" > > I see this one more often. It is also in Pty.pm, > in > >the make_slave_controlling_terminal subroutine. > >According to the code, it comes from a failure to > open > >/dev/tty. > > > >Can anyone help me? Expect is about the only tool I > >can use for my testing infrastructure (that I know > >about at least). But these occasional failures make > my > >infrastructure itself unreliable. I could really > use > >some assistance. > > > >Thanks so much, > >Dave > > > >__________________________________ > >Do you Yahoo!? > >Yahoo! SiteBuilder - Free, easy-to-use web site > design software > >http://sitebuilder.yahoo.com > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built > ASP.NET sites including > >Data Reports, E-commerce, Portals, and Forums are > available now. > >Download today and enter to win an XBOX or Visual > Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > >_______________________________________________ > >Expectperl-discuss mailing list > >Exp...@li... > >https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |