[ expect-Bugs-1279388 ] broken pipe with more introduced in expect-5.43, 5.41 works.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ expect-Bugs-1279388 ] broken pipe with more introduced in expect-5.43, 5.41 works.

SourceForge.net
Bugs item #1279388, was opened at 2005-09-01 07:39
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=113179&aid=1279388&group_id=13179

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: Claudio Fontana (sick_soul)
Assigned to: Andreas Kupries (andreas_kupries)
Summary: broken pipe with more introduced in expect-5.43, 5.41 works.

Initial Comment:
Hello,
there seems to be a bug introduced in expect-5.43,
where standard output can not be piped to more anymore.

Here is my test and the answer on my system (GNU/Linux
Slackware 10.1, customized, Kernel 2.6.12 on Intel P4):

--------test.tcl--------
set biglist [list somestring somethingelse]

for { set i 0 } { $i < 50 } { incr i } {
    lappend biglist more_stuff
}

foreach element $biglist {
    puts $element
}
-------------------------

# now use expect 5.41 as interpreter and pipe output
through more

$ /usr/bin/expect
expect1.1> exp_version
5.41.0
expect1.2> exit

$ /usr/bin/expect test.tcl | more

somestring
somethingelse
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
--More--
...

# now test using expect-5.43 as interpreter and pipe
through more

$ /home/claudio/usr/bin/expect
expect1.1> exp_version
5.43.0
expect1.2> exit

$ /home/claudio/usr/bin/expect test.tcl | more
...
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
more_stuff
error writing "stdout": broken pipe
    while executing
"puts $element"
    ("foreach" body line 2)
    invoked from within
"foreach element $biglist {
    puts $element
}"
    (file "test.tcl" line 7)

----------------------------------------------------
This error does not always happen, sometimes I get five
or more clean runs before getting the broken pipe.

Repeated runs with expect-5.41 never show the error.


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2005-09-05 12:37

Message:
Logged In: NO

requiring package Expect is not necessary to reproduce the
error if you use the expect binary as the interpreter.
If you run the tclsh interpreter, instead, the require
package Expect line is necessary.


----------------------------------------------------------------------

Comment By: Claudio Fontana (sick_soul)
Date: 2005-09-05 01:48

Message:
Logged In: YES
user_id=790036

ERRATA: add

"package require Expect"

at the beginning of the script to obtain the error described.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=113179&aid=1279388&group_id=13179


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Tcl-Bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-bugs