Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1c8319bab72542da13e1fe25451f20b946247e2b
Ticket: 3545365fffffffffffffffffffffffffffffffff
Crash in io-29.33b (no implicit flush of nonblocking on exit
User & Date: ferrieux on 2012-07-24 23:23:12
Changes

  1. icomment:
    Twylite reports still 1  failure out of 20 runs.
    Refining to break out of both while loops in PipeWriterThread, by setting toWrite to zero. 
    
    
    Index: win/tclWinPipe.c
    ===================================================================
    --- win/tclWinPipe.c
    +++ win/tclWinPipe.c
    @@ -1878,10 +1878,16 @@
                 * Wait for the writer thread to finish the current buffer, then
                 * terminate the thread and close the handles. If the channel is
                 * nonblocking, there should be no pending write operations.
                 */
     
    +           /* ALEX - ugly hack to check inter-thread io cancellation */
    +           if (pipePtr->flags & PIPE_ASYNC) {
    +               pipePtr->toWrite=0;
    +               CloseHandle (((WinFile *)pipePtr->writeFile)->handle);
    +           }
    +
                WaitForSingleObject(pipePtr->writable, INFINITE);
     
                /*
                 * The thread may already have closed on it's own. Check its exit
                 * code.
    @@ -3140,8 +3146,9 @@
     
    
     /*
      * Local Variables:
      * mode: c
      * c-basic-offset: 4
    + * tab-width: 8
      * fill-column: 78
      * End:
      */
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"