Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7a204dae867ea314f75bcefdb978fb420d67bed1
Ticket: 219121ffffffffffffffffffffffffffffffffff
fcopy alters blocking state
User & Date: nobody on 2000-10-26 01:11:05
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. 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
    
  4. foundin changed to: "obsolete: 8.3.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "62. (unused)"
  10. title changed to: "fcopy alters blocking state"
  11. type changed to: "Bug"