Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b4d960bf03458b93ff68077cb946c23af6d064d7
Ticket: 10dc6daa375d45051a3c6064cbc1b32686bc1745
Tcl_Gets() fails to read non-blocking socket
User & Date: anonymous on 2014-10-15 19:30:30
Changes

  1. icomment:
    It seems the timing of the incoming data is important, the yes | netcat does not work reliably as data source to provoke the error.  
    
    In my case the remote host sends data with 64kHz,  some lines with 33 chars and some lines with 11 chars.
    
    With this timing I get:
    
    8.5.17
    sh-4.2$ env LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./t 192.168.2.1
    got 6 chars with 3170 nothings
    got -1 chars with 1000001 nothings
    got -1 chars with 1000001 nothings
    got -1 chars with 1000001 nothings
    got -1 chars with 1000001 nothings
    got -1 chars with 1000001 nothings
    got -1 chars with 1000001 nothings
    got -1 chars with 1000001 nothings
    ...
    
    8.5.15
    got 6 chars with 3625 nothings
    got 36 chars with 4736 nothings
    got 11 chars with 7845 nothings
    got 11 chars with 3386 nothings
    got 11 chars with 2608 nothings
    got 11 chars with 13933 nothings
    got 33 chars with 11034 nothings
    got 33 chars with 0 nothings
    got 11 chars with 2421 nothings
    got 11 chars with 15560 nothings
    got 11 chars with 15089 nothings
    got 33 chars with 12023 nothings
    got 33 chars with 0 nothings
    got 11 chars with 2774 nothings
    got 11 chars with 16272 nothings
    got 11 chars with 15980 nothings
    got 33 chars with 13336 nothings
    got 33 chars with 0 nothings
    got 11 chars with 3022 nothings
    ...
    
  2. login: "anonymous"
  3. mimetype: "text/plain"