Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2087fe14bae824a6654d08f5cf670d6dac2897a1
Ticket: 2446662fffffffffffffffffffffffffffffffff
chanIO.test failures on Win32 msys/mingw
User & Date: ferrieux on 2009-01-05 22:13:37
Changes

  1. icomment:
    Some progress on the ECONNRESET/EOF issue:
    Detailed analysis on Linux, shows that on receiving an RST, the [gets] yields -1 (EOF) in all cases (i.e whether the recv() is initiated before reception of RST or not, while at the syscall level (strace) we can see that the recv() returned ECONNRESET in both cases. 
    
    In summary: on unix, ECONNRESET is purely an internal matter, purposefully turned into an EOF, as witnessed by  the following code in tclUnixChan.c:
    
        if (errno == ECONNRESET) {
    /*
     * Turn ECONNRESET into a soft EOF condition.
     */
    return 0;
    
    while on Windows, it is exposed as an error, as commented in this comment from 1996 in the "changes" file:
    
       8/20/96 (bug fix) No longer masking ECONNRESET on Windows sockets so
       that the higher level of the IO mechanism sees the error instead of
       entering an infinite loop. (JL)
    
    Very old indeed... and beyond 8.x CVS history ! Do you know who JL is ?
    Anyway, I don't see why turning ECONNRESET into EOF (just like on unix) would create an infinite loop...
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"