http://qs1969.pair.com?node_id=591886


in reply to Alarm and Telnet issues

Hi pubscout,

Your code probably is not working because Net::Telnet uses internly alarm and $SIG{ALRM} to handler timeouts itself.

You should use the Net::Telnet timeout instead.

Replies are listed 'Best First'.
Re^2: Alarm and Telnet issues
by pubscout (Initiate) on Dec 27, 2006 at 20:04 UTC
    Bummer. I guess that means that there is no trivial way to have a global timeout when using Net::Telnet.

    Thanks for the help!

      Well, no lightweight trivial way.
      use POSIX (); $SIG{USR1} = sub { ... }; unless(fork) { sleep(4); kill(POSIX::SIGUSR1(), getppid()); exit; }