Re: expect + telnet hangs on AIX
- From: kkivi@xxxxxxxxxx (Konstantin Kivi)
- Date: 12 Apr 2005 04:12:54 -0700
Don Libes <libes@xxxxxxxx> wrote in message news:<s6afyxxe0vx.fsf@xxxxxxxxxxxxxxxxxx>...
> kkivi@xxxxxxxxxx (Konstantin Kivi) writes:
>
> > >
> > > Use autoexpect <URL: http://wiki.tcl.tk/autoexpect >.
> > > It's ideal help in such situations.
> >
> > Unfortunataly, it hangs too, after writing that script.exp is
> > created.
> >
> > It's interesting that ps doesn't show any 'expect' instances,
> > only 'sh'. When I kill 'sh' the session is still hanging. I have
> > to kill ssh client from my cleint maachine.
>
> Your description is too vague. Let's start over - can you get Expect
> to interact with any program properly? Is it only telnet that
> misbehaves? Is it only telnet to a particular host that misbehaves?
> And what versions of Expect and AIX are you using?
>
> Don
Don,
AIX version is 5.3
[grs1]/grs1/home/tst > expect -v
expect version 5.43.0
[grs1]/grs1/home/tst >
[grs1]/grs1/home/tst > ldd `which expect`
/usr/local/bin/expect needs:
/usr/lib/libc.a(shr.o)
/usr/local/lib/libtcl8.4.so
/unix
/usr/lib/libcrypt.a(shr.o)
/usr/lib/libdl.a(shr.o)
[grs1]/grs1/home/tst >
here is sample client
==============================
#!/bin/sh
echo ==
while read aaa ; do
if [ "$aaa" = "quit" ] ; then
exit 1;
fi
echo $aaa $aaa
echo ==
done
===========================
here is sample script
========================
spawn exp.sh
expect "==" { sleep .1 ; send "bbb\r" }
expect "==" { sleep .1 ; send "quit\r" }
======================================
This script hangs 80% of the time
When running expect -d it never hangs
If I add
puts "bye"
at the end of samle script it hangs 25 % times
If I run it with nohup it never hangs.
Sincerely yours, Konstantin Kivi <konst at sirena2000.ru>
.
- Follow-Ups:
- Re: expect + telnet hangs on AIX
- From: Don Libes
- Re: expect + telnet hangs on AIX
- From: Khaled
- Re: expect + telnet hangs on AIX
- References:
- expect + telnet hangs on AIX
- From: Konstantin Kivi
- Re: expect + telnet hangs on AIX
- From: kkivi
- Re: expect + telnet hangs on AIX
- From: Khaled
- Re: expect + telnet hangs on AIX
- From: Konstantin Kivi
- Re: expect + telnet hangs on AIX
- From: Cameron Laird
- Re: expect + telnet hangs on AIX
- From: Konstantin Kivi
- Re: expect + telnet hangs on AIX
- From: Don Libes
- expect + telnet hangs on AIX
- Prev by Date: Re: Efficient use of results of [binary scan]
- Next by Date: Re: Tcl Style Guide
- Previous by thread: Re: expect + telnet hangs on AIX
- Next by thread: Re: expect + telnet hangs on AIX
- Index(es):
Relevant Pages
|
|