Re: cannot call a process via telnet

From: Wiggins d Anconia (wiggins_at_danconia.org)
Date: 10/12/04


Date: Tue, 12 Oct 2004 11:04:34 -0600
To: stalp@imbei.uni-mainz.de, beginners@perl.org


>
> > It appears from the docs that the C<cmd> method can take a timeout as
> > well. I suspect adding the '&' will cause problems because the shell
> > will return control to Net::Telnet and there will be no way to
> > communicate with the process. Note that when you switch to include
> > other arguments with C<cmd> it appears you need to pass the command with
> > the 'String' key.
>
> Sure but this doesn't make any change if I call the cmd with a prepared
> string or a directly into the brackets. I was at this point a few hours
> before. Calling a process with the cmd- method. Then I found the print -
> method in the docs. But both have the same problem: sending a command
over
> the telnet without waiting for the answer. And I don't want to change the
> timeout because the script has more functions than to wait for another
> process exit. The docs doesn't give any solution how to make this!
>
> Its no problem to call a process manualy over the telnet with a '&' at
least
> our servers!
>
> Gruss Christian
>
>

huh, one might think that would have been helpful to mention up front.
Now that we have come full circle I will point you once again back to
the docs, and this time specifically the C<waitfor> method and the list
of 3-4 examples at the bottom of the docs that talk about how to
interact with a program, specifically the ssh example and the passwd
example. This should allow you to turn off the timeout, or at least set
it to something arbitrarily high.

http://danconia.org



Relevant Pages