[rancid] cygwin + long hostname = clogin hang

Lee ler762 at gmail.com
Fri Aug 27 14:06:25 UTC 2010

On 8/24/10, john heasley <heas at shrubbery.net> wrote:
> Mon, Aug 23, 2010 at 05:44:33PM -0400, Lee:
>> clogin hangs when I use it from cygwin to ssh into a cisco switch with
>> a long hostname.
>> It looks like a bug in cygwin expect causes the timeout.  The
>>         expect {
>>             -re $reprompt       { }
>> at line 611 fails if I've got a long hostname configured on the cisco
>> switch:
> likely means that the regex library is broken.  the length is not entirely
> arbitrary.

Just out of curiosity - what made you pick up to the first 11 chars of
the prompt?

  <.. snip regex problem description ..>
>> And then at clogin line 423, if a timeout happens clogin hangs until I
>> open task manager and kill the ssh process (<ctrl>C in the terminal
>> window doesn't kill it).  The 'catch{close}; catch{wait};' doesn't end
>> the ssh session.  Adding a 'send "exit\r"' fixes the hang for me:
> maybe try the linux/solaris expect patches.

Is there some situation where sending "exit\r" after getting a timeout
would be a bad idea?

I found an expect doc that said 'close' was supposed to close an open
connection, but it clearly doesn't for ssh with cygwin expect.
Changing the length of reprompt is a cygwin work-around (and if anyone
else runs into the same problem, the work-around is in the archives
now :), but is sending an exit after getting a timeout a cygwin
work-around or a not-so-bad idea for general use?

> you could also try a unix box

$WORK can be a bit strange.  I've got PC admin privs, in part, to
'evaluate software' but I was told that I couldn't install this
software on a linux box until I got the software approved.  *sigh*


More information about the Rancid-discuss mailing list