Tcl Source Code

View Ticket
Login
Ticket UUID: 3103740
Title: socket_inet6-12.2 inconsistent failures
Type: Bug Created on: 2010-11-05 17:42:16
Submitter: dgp Assigned to: rmax
Subsystem: 27. Channel Types Severity:
Priority: 5 Medium Last modified: 2010-11-29 20:29:42
Status: Open Closed by:
Resolution: None Closed on:
Version: obsolete: 8.6b1.1
Description:
==== socket_inet6-12.2 testing inheritance of client sockets FAILED
==== Contents of test case:

    # Create the server socket
    set server [socket -server accept -myaddr $localhost 0]
    proc accept { file host port } {
        # When the client connects, establish the read handler
        global server
        close $server
        fileevent $file readable [list getdata $file]
        fconfigure $file -buffering line -blocking 0
    }
    proc getdata { file } {
        # Read handler on the accepted socket.
        global x failed
        set status [catch {read $file} data]
        if {$status != 0} {
            set x {read failed, error was $data}
            catch { close $file }
        } elseif {$data ne ""} {
        } elseif {[fblocked $file]} {
        } elseif {[eof $file]} {
            if {$failed} {
                set x {client socket was inherited}
            } else {
                set x {client socket was not inherited}
            }
            catch { close $file }
        } else {
            set x {impossible case}
            catch { close $file }
        }
    }
    # Launch the script2 process
    ### exec [interpreter] script2 &
    set p [open "|[list [interpreter] $path(script2)]" w]
    puts $p [lindex [fconfigure $server -sockname] 2] ; flush $p
    vwait x
    return $x

---- Result was:
client socket was inherited
---- Result should have been (exact matching):
client socket was not inherited
==== socket_inet6-12.2 FAILED


Sometimes fails; sometimes does not.

Suspect the tightening of some timeouts
overshot a bit.
User Comments:
dgp added on 2010-11-29 20:29:42:
still seeing this.