使用expect模块telnet错误后就挂了!

屠龙
使用expect模块telnet错误后就挂了!

使用了expect模块:
$exp->spawn("telnet 192.168.6.6") or die "Cannot spawn @_: $!/n";

出现报错后就一直挂着,如何让程序正常退出运行?

[[i] 本帖最后由 屠龙 于 2008-5-11 19:30 编辑 [/i]]

apile
请设定 timeout与 exit...

屠龙
噢,谢谢!