Syntactic Confectionery Delight | |
PerlMonks |
Alarm and Telnet issuesby pubscout (Initiate) |
on Dec 27, 2006 at 16:38 UTC ( [id://591881]=perlquestion: print w/replies, xml ) | Need Help?? |
pubscout has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks, I am attempting to script an automated telnet session that has an overall timeout and will also handle reconnect attempts for dropped sessions. I'm using an alarm for the global timeout control, which by itself works as expected, but as soon as I add a few Net::Telnet object calls the alarm exception does not seem to propagate. My next intention is to handle dropped connections by receiving Net::Telnet specific exceptions and returning to the telnet_connect label to reconnect and retry, all within the same timeout eval scope. The first question is why does the alarm fail to trigger with the addition of the Net::Telnet object, even when setting PERL_SIGNALS=unsafe ? Secondly, is this the best way to handle reconnecting to dropped telnet sessions while being governed by a global timeout? Thanks in advance for any glimpse of enlightenment!
Back to
Seekers of Perl Wisdom
|
|