Overview
| Artifact ID: | aae4d36c2bed9152e641ed517903a8db7deb1adc |
|---|---|
| Ticket: | 219327ffffffffffffffffffffffffffffffffff
close $pipe doesn't return non-zero exit status |
| User & Date: | nobody on 2000-10-26 05:10:48 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 4044 Bug Version: 8.2.3 SubmitDate: '2000-01-19' LastModified: '2000-02-05' Severity: SER Status: UnAssn Submitter: techsupp ChangedBy: hobbs OS: Solaris OSVersion: SunOS 5.5.1 Machine: Sun Ultra 5 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Mikhail Terekhov Comments: Both tcl8.2.3 and tcl8.3b2 have the same bug. ReproducibleScript: Save the following script as ~/test.tcl proc Pipe_Reader1 { fd } { if [ eof $fd ] { if [ catch { close $fd } message ] { puts "ERROR detected inside fileevent: $message" } else { puts "OK inside fileevent" } global wt set wt 1 } else { puts [ read $fd ]\n } } proc Pipe_Reader2 { fd } { if [ eof $fd ] { global wt set wt 1 } else { puts [ read $fd ]\n } } #====================================================================== global wt set cmd "| cat /xyz" set rc [ catch { open $cmd r } fd ] fconfigure $fd -blocking 0 -buffering line fileevent $fd readable [ list Pipe_Reader1 $fd ] vwait wt set rc [ catch { open $cmd r } fd ] fconfigure $fd -blocking 0 -buffering line fileevent $fd readable [ list Pipe_Reader2 $fd ] vwait wt if [ catch { close $fd } message ] { puts "ERROR detected outside fileevent: $message" } else { puts "OK inside fileevent" } ObservedBehavior: home:> /usr/Local/tcltk.8.3b2/bin/tclsh8.3 ~/test.tcl OK inside fileevent OK inside fileevent home:> /usr/Local/tcltk.8.2.3/bin/tclsh8.2 ~/test.tcl OK inside fileevent OK inside fileevent DesiredBehavior: The same script produces valid results when tcl8.2.1 is used: home:> /usr/Local/tcltk.8.2.1/bin/tclsh8.2 ~/syren/test1.tcl ERROR detected inside fileevent: cat: cannot open /xyz ERROR detected outside fileevent: cat: cannot open /xyz - foundin changed to: "final: 8.2.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "60. NRE and coroutines"
- title changed to: "close $pipe doesn't return non-zero exit status"
- type changed to: "Bug"