Overview
| Artifact ID: | 7a204dae867ea314f75bcefdb978fb420d67bed1 |
|---|---|
| Ticket: | 219121ffffffffffffffffffffffffffffffffff
fcopy alters blocking state |
| User & Date: | nobody on 2000-10-26 01:11:05 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.3.2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "62. (unused)"
- title changed to: "fcopy alters blocking state"
- type changed to: "Bug"