Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c59f962d6fa2273fce7a0071ffb7a112f185bfd1
Ticket: 3590287fffffffffffffffffffffffffffffffff
Proc hangs when channel not closed
User & Date: blacksqr on 2012-11-27 06:29:41
Changes

  1. assignee changed to: "nijtmans"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    A proc that attempts to read output from an external process hangs if the process output channel isn't closed before attempting to return.
    
    This proc runs fine with e.g. "run_cmd ls":
    
    proc run_cmd {cmd} {
    set channel [open "| $cmd"]
    chan event $channel readable "set ::ready_$channel {}"
    vwait ::ready_$channel
    set result [read $channel]
    close $channel
    return $result
    }
    
    Now edit the above proc by commenting out the close command.  When executed it never returns.
    
    Tested on 8.5.11 and 8.6.0.0b8 on Ubuntu 10.04.  ActiveState distribution.
    
  4. foundin changed to: "obsolete: 8.5.13"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "blacksqr"
  10. subsystem changed to: "02. Event Loops"
  11. title changed to: "Proc hangs when channel not closed"
  12. type changed to: "Bug"