Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ae8dcf185005d78c78a060104c337f5eeaf461a3
Ticket: 3545365fffffffffffffffffffffffffffffffff
Crash in io-29.33b (no implicit flush of nonblocking on exit
User & Date: twylite on 2012-07-24 20:32:12
Changes

  1. icomment:
    In tclWinPipe.c, PipeWriterThread() only calls SetEvent(infoPtr->writable) once the WriteFile() loop has written out all data.  i.e. WaitForSingleObject(pipePtr->writable) will only wake once the flush is complete.
    
    If the file handle is closed then WriteFile() should fail and the thread should terminate.  I tried moving TclpCloseFile(pipePtr->writeFile) in PipeClose2Proc() to above WaitForSingleObject(pipePtr->writable), but that doesn't help, because of this:
    
    TclpCloseFile:
    /*
     * Don't close the Win32 handle if the handle is a standard channel
     * during the thread exit process. Otherwise, one thread may kill the
     * stdio of another.
     */
    
    Hmm.
    
    
    
  2. login: "twylite"
  3. mimetype: "text/plain"
  4. username: "twylite"