Re: tcl/expect freeze
- From: mastle3400@xxxxxxxxx
- Date: 28 Mar 2007 05:03:18 -0700
On Mar 28, 6:36 am, Uwe Klein <uwe_klein_habertw...@xxxxxxxxxxx>
wrote:
kbuzz3...@xxxxxxxxx wrote:
Uwe,
I set the timeout to 70. In one or two of the scripts, I set the
timeout to something like 1000 when there is a very long response that
has some very long pauses (this is also one of the times that I use
the exp_continue to break the response up and reset the timeout).
OK, just asking.
sometimes "special" vars are trashed by the programmer.
You are sitting on a windows (ver?) box and accesing unix hosts?
uwe
Hi,
OK. I am using windows xp and connecting with a router. I set my
scripts to run in a loop until it froze. It did finally happen.
Stripped down version of my source code is below (the source file only
contains subroutines and does not actually "do" anything). The ouput
stops after the "zxz about to spawn telnet********************\n"
line.
So it would appear in this case that the spawn telnet line is
causing the problem. Again just to repeat, usually these scripts work
fine and I believe it often freezes at this point in the script (spawn
the telnet), it is not always the case.
thank you very much,
Matt
if {[file isdirectory logs] == 0} {
# directory does not exist
file mkdir logs
}
set _stime [clock seconds]
set time [clock format $_stime -format %k_%M_%m_%d_%y]
if {[info exists _base_script_name]} {
set _base_script_name [file tail $_base_script_name]
} else {
set _base_script_name [file tail $argv0]
}
exp_internal -f "$_base_script_name\_large_output" 0
append temp $time _ $_base_script_name .log
log_file -noappend ./logs/$temp
send_user "\nBeginning $_base_script_name test:\n\n"
if {[file exists routines.exp] } {
puts "routines.exp found in the current directory\n"
source routines.exp
} elseif { [file exists "c:/automation/routines.exp"] } {
puts "routines.exp found in c:/automation/routines.exp\n"
source c:/automation/routines.exp
else {
puts "routines.exp not found. Please add to the same directory as
the script\n"
exit
}
send_user "zxz after the routines has been
sourced****************************\n"
set force_conservative 1
match_max -d 5000
set timeout 70
foreach {opt val} $argv {
switch -glob -- $opt {
-help {
set a [help_screen]
exit
}
-ip {
set _router_ip $val
}
-port {
set _port $val
}
}
}
send_user "zxz about to spawn telnet********************\n"
spawn telnet $_router_ip $_port
if { [catch { set a [log_in $_base_script_name $last_arg]} result ]} {
set a [error_exit "$errorInfo" ]
}
send_user "zxz after spawn telnet********************\n"
.
- Follow-Ups:
- Re: tcl/expect freeze
- From: kbuzz3400
- Re: tcl/expect freeze
- References:
- tcl/expect freeze
- From: kbuzz3400
- Re: tcl/expect freeze
- From: Bezoar
- Re: tcl/expect freeze
- From: kbuzz3400
- Re: tcl/expect freeze
- From: Glenn Jackman
- Re: tcl/expect freeze
- From: Cameron Laird
- Re: tcl/expect freeze
- From: kbuzz3400
- Re: tcl/expect freeze
- From: Uwe Klein
- Re: tcl/expect freeze
- From: kbuzz3400
- Re: tcl/expect freeze
- From: Uwe Klein
- tcl/expect freeze
- Prev by Date: Re: regarding multi-layered notebook widget
- Next by Date: Re: tcl/expect freeze
- Previous by thread: Re: tcl/expect freeze
- Next by thread: Re: tcl/expect freeze
- Index(es):
Relevant Pages
|