Artifacts Associated With Ticket 219121
Ticket change [7a204dae86] (rid 90248) by nobody on 2000-10-26 01:11:05:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 6261 Bug Version: 8.3.2 SubmitDate: '2000-09-13' LastModified: '2000-09-27' Severity: SER Status: Released Submitter: techsupp ChangedBy: hobbs OS: All Unix Machine: intel linux FixedDate: '2000-09-27' FixedInVersion: 8.4a2 ClosedDate: '2000-10-25' Name: Fustaf Neumann ReproducibleScript: Hi folks, It looks to me as if there is a bug in the fcopy command in Tcl 8.3.2, which was not there in 8.0.5. fcopy changes the buffering state of a channel to 1 in the new version. The script below returns the following results for different Tcl versions: Results in Tcl 8.0.5 START: blocking(file3) 0 FCOPY: blocking(file3) 0 DONE: blocking(file3) 0 Results in Tcl 8.3.2 START: blocking(file3) 0 FCOPY: blocking(file3) 0 DONE: blocking(file3) 1 Best regards -gustaf ================================================ proc stat where { puts stderr " $where: blocking($::out) [fconfigure $::out -blocking]" } proc done {args} { stat DONE close $::in } puts stderr "Results in Tcl $tcl_patchLevel" set out [open /dev/null w] fconfigure $out -blocking 0 stat START set in [open fcopy-bug r] fcopy $in $out -command done stat FCOPY catch {vwait forever} ObservedBehavior: fcopy changes blocking state DesiredBehavior: results in Tcl 8.3.2 should be the same as in earlier releases, e.g. fcopy should not alter blocking state. This was introduced by a partial fix (exposing another bug) in 8.3.2. tclIO.c:StopCopy was not reseting the nonBlocking flag when resetting the flags for the write side. if (csPtr->readPtr != csPtr->writePtr) { + nonBlocking = (csPtr->writeFlags & CHANNEL_NONBLOCKING); if (nonBlocking != (outStatePtr->flags & CHANNEL_NONBLOCKING)) { -- 09/27/2000 hobbs - foundin initialized to: "obsolete: 8.3.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "62. (unused)"
- title initialized to: "fcopy alters blocking state"
- type initialized to: "Bug"
Ticket change [9b8ba62b93] (rid 111145) by welch on 2000-10-26 08:34:57:
- closedate changed to: "2000-10-26T01:34:57"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [92bfa69b7f] (rid 120827) by dgp on 2001-04-03 06:23:16:
- closedate changed to: "2001-04-02T23:23:16"
- closer changed to: "dgp"
- subsystem changed to: "25. Channel System"