Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: cf351274ef1e8f6a8524d4a2e7cf21d1586b7e77
Ticket: 462317ffffffffffffffffffffffffffffffffff
Notification when there's no data
User & Date: andreas_kupries on 2001-09-19 07:09:15
Changes

  1. icomment:
    Logged In: YES 
    user_id=75003
    
    I talked about this line
    
    17:03:34 select(23, [4 6 8 10 12 16 18 20 22], [], [4 6 8 
    10 12 14 16 18 20 22], {0, 0}) = 0 (Timeout)
    
    ... Ok, the manpage of select says that the read list is 
    the second argument ... 14 is missing. It shouldn't be, 
    there is a Tcl_CreateFileHandler call before that without 
    intervening Tcl_DeleteFileHandler.
    
    Understand that we are talking about two levels of 
    bufering/data here. One is data buffered in the OS for the 
    process. The other is data buffered by Tcl itself. Expect 
    is given a notification that there is some data available. 
    This data happens to be in the tcl buffers. In our 
    situation expect asks tcl for more than is in the buffers, 
    so tcl asks the OS and given that the 'read' is blocking 
    but as the tcl core believes that it will perform a 
    nonblocking call (line 512) tcl is perfectly right to do 
    this call. It expect that the call will give it a short 
    read. And hangs because unexpectedly the call is actually 
    blocking.
    
    If I understand your situation correctly the external 
    process waits for a information send to it by expect and 
    expect expects (sic!) the same channel to send something to 
    it (after it already got partial information ?). This is 
    something I should be able to reproduce with a simpler 
    script. Right ?
    
    
    
  2. login: "andreas_kupries"
  3. mimetype: "text/plain"
  4. username: "andreas_kupries"