The file /tmp/foo.exp contains a single line which reads "spawn cat". When I run "expect -d /tmp/foo.exp", I get: expect version 5.28.1 argv[0] = expect argv[1] = -d argv[2] = /tmp/foo.exp set argc 0 set argv0 "/tmp/foo.exp" set argv "" executing commands from command file /tmp/foo.exp spawn cat parent: waiting for sync byte parent: telling child to go ahead parent: sync byte write: broken pipe This should not be happening.
On my system, expect doesn't work at all ! Recompiling the source RPMs didn't help, but recompiling _without_ -O2 did ! This is a HP Netserver LC 3 with a 400 Mhz Pentium II.
Expect 5.28.1 isn't distributed with Red Hat Linux, and the version that comes with RHL does not seem to have this problem.
Someone here is confused, and I don't think it's me. expect-5.28-30.i386.rpm ships with RedHat 6.1 That is what is installed on my machine: > rpm -q expect expect-5.28-30 > rpm --verify expect > That version is, indeed, expect 5.28.1: > expect expect1.1> exp_version 5.28.1 expect1.2> exit > And that version does, indeed, have this problem: > cat /tmp/foo.exp spawn cat > expect -d /tmp/foo.exp expect version 5.28.1 argv[0] = expect argv[1] = -d argv[2] = /tmp/foo.exp set argc 0 set argv0 "/tmp/foo.exp" set argv "" executing commands from command file /tmp/foo.exp spawn cat parent: waiting for sync byte parent: telling child to go ahead parent: sync byte write: broken pipe >
Created attachment 90 [details] patch to fix this bug; should be submitted to Expect maintainers
That's funny: [root@ostrich-deluxe 6.2]# type expect expect is hashed (/usr/bin/expect) [root@ostrich-deluxe 6.2]# rpm -qf /usr/bin/expect expect-5.28-30 [root@ostrich-deluxe 6.2]# expect expect1.1> exp_version 5.26 expect1.2> [root@ostrich-deluxe 6.2]# Why is it telling you 5.28.1?
Date: Sat, 5 Feb 2000 21:29:46 -0500 From: Jonathan Kamens <jik.ma.us> To: bugzilla CC: jbj Subject: Re: [Bug 7775] Changed - "expect -d" doesn't work > Date: Fri, 4 Feb 2000 14:10:20 -0500 > From: bugzilla.com > > +Why is it telling you 5.28.1? A better question would be, "Why is it telling YOU 5.26?" Did you run "rpm -q -v expect", as I did, to confirm that something hasn't replaced the expect binary on your machine such that it no longer matches what was in the RPM? I strongly suspect that something has. Did you try reinstalling the RPM and seeing if that changes the version of expect installed on your machine? I strongly suspect that it will. If you download and unpack the tcltk source RPM and run "tar tzf /usr/src/redhat/SOURCES/expect.tar.gz", you will see a bunch of path names starting with "expect-5.28/". It is clear that the version of expect in this RPM is 5.28, not 5.26. In any case, if you look at the patch that I submitted, it should be obvious that the patch is correct and should be applied. Jonathan Kamens
Date: Sun, 6 Feb 2000 16:02:59 -0500 From: Jonathan Kamens <jik.ma.us> To: jik.ma.us CC: bugzilla, jbj Subject: Re: [Bug 7775] Changed - "expect -d" doesn't work Last night, I wrote: > Did you run "rpm -q -v expect", I should have said "rpm --verify expect", not "rpm -q -v expect". jik
Fixed (i.e. your patch is in) in tcltk-8.2.3-36.