Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8eb19fc9bfd84974e8fcd25068074eece4e2742f
Ticket: 947693ffffffffffffffffffffffffffffffffff
Closing a non-blocking pipe can block on Win
User & Date: stevebold on 2004-06-02 23:23:54
Changes

  1. icomment:
    Logged In: YES 
    user_id=810219
    
    For comparison, using 8.4.3 on Solaris 2.8, waitpid() is called
    at the following stack trace:
    
    =>[1] waitpid(0x38b5, 0xffbee17c, 0x40, 0x0, 0x0, 0x0), at 
    0xff21a418 
      [2] Tcl_WaitPid(0x38b5, 0xffbee17c, 0x40, 0x38b5, 0x0, 
    0x0), at 0x97b58 
      [3] Tcl_ReapDetachedProcs(0xf80d0, 0xc0564, 0xc0564, 
    0x0, 0x21d9c, 0x9782c), at 0x898a8 
      [4] PipeCloseProc(0xf3088, 0xd4520, 0x0, 0x0, 0xde080, 
    0xdd7d8), at 0x978f8 
      [5] CloseChannel(0xd23f8, 0xe03b0, 0x0, 0xc0564, 0xe40f8, 
    0xd4520), at 0x7202c 
      [6] FlushChannel(0xd4520, 0x0, 0x0, 0xe40f8, 0x0, 
    0xe03b0), at 0x71f0c 
      [7] Tcl_Close(0x0, 0xe03b0, 0xc0564, 0xe03b0, 0xe40f8, 
    0xd4520), at 0x72430 
      [8] Tcl_UnregisterChannel(0xd4520, 0xe03b0, 0xe40f8, 
    0xc0564, 0xf80f0, 0xc0564), at 0x710e4 
      [9] Tcl_CloseObjCmd(0x0, 0xd4520, 0x2, 0xd7704, 0x791fc, 
    0xe4f08), at 0x79268 
      [10] TclEvalObjvInternal(0xd4520, 0x0, 0x0, 0x0, 0x0, 0x0), 
    at 0x329b0 
      [11] TclExecuteByteCode(0xd4520, 0xc355c, 0xc3564, 
    0xde0ed, 0x0, 0xd7704), at 0x5e83c 
      [12] TclCompEvalObj(0x0, 0x16c, 0xd4520, 0xc0564, 
    0xde080, 0xdd7d8), at 0x5de88 
      [13] Tcl_EvalObjEx(0x0, 0xdd7d8, 0x20000, 0xc0564, 0x0, 
    0xd4520), at 0x33934 
      [14] Tcl_RecordAndEvalObj(0x0, 0xdd7d8, 0x20000, 
    0x20000, 0xd4520, 0x9), at 0x6d894 
      [15] Tcl_Main(0xc3554, 0xdcc80, 0xe7320, 0xc0564, 0x0, 
    0xd4520), at 0x1c110 
      [16] main(0x1, 0xffbeeb54, 0xffbeeb5c, 0xc3400, 0x0, 0x0), 
    at 0x1bac0 
    
    The UNIX specific function PipeCloseProc() contains this:
    
    
        if (pipePtr->isNonBlocking || TclInExit()) {
        
       /*
             * If the channel is non-blocking or Tcl is being cleaned 
    up, just
             * detach the children PIDs, reap them (important if we 
    are in a
             * dynamic load module), and discard the errorFile.
             */
            
            Tcl_DetachPids(pipePtr->numPids, pipePtr->pidPtr);
            Tcl_ReapDetachedProcs();
    
    
    There is no corresponding logic in the Windows specific 
    equivalent function
    PipeClose2Proc(). Should there be?
    
    
    
  2. login: "stevebold"
  3. mimetype: "text/plain"
  4. username: "stevebold"