Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c6be1367c4f213b671ed16f4b8e6c11151e418b9
Ticket: 3545365fffffffffffffffffffffffffffffffff
Crash in io-29.33b (no implicit flush of nonblocking on exit
User & Date: nijtmans on 2012-07-23 19:19:54
Changes

  1. icomment:
    New suggestion. Change
    if (chanPtr->typePtr->closeProc == TCL_CLOSE2PROC) {
    to:
    if (chanPtr->typePtr->closeProc == TCL_CLOSE2PROC &&
    chanPtr->flags & CHANNEL_DEAD) {
    
    That would be better, because we cannot assume that
    chanPtr->instanceData == NULL means that the channel
    is dead. Maybe some channel type doesn't need further
    internal data, but still supports the close2proc.
    
    Wondering why chanPtr->instanceData is set to NULL
    anyway when the channel is dead: the flag should be
    sufficient to make sure that no more IO operations
    are done on it, so there is no need to clear instanceData
    as well. (although, thanks to this NULL setting we found this flaw.....)
    
    
  2. login: "nijtmans"
  3. mimetype: "text/plain"
  4. username: "nijtmans"