Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0729138a8f6825f27d7aeb4acb6ed7bb0317c249
Ticket: 943274ffffffffffffffffffffffffffffffffff
Tcl 8.4.5 with Expect 5.39 hangs waiting for data matching p
User & Date: andreas_kupries on 2004-05-05 23:37:36
Changes

  1. icomment:
    Logged In: YES 
    user_id=75003
    
    Found the entry in the changelog after a cvs annotate ...
    Here it is. And this seems to be exactly about the situation
    you are encountering. Seems that I have to revisit this code.
    
    2001-09-26  Andreas Kupries 
    <[email protected]> 
    
    * doc/fileevent.n: Accepted [Patch #465279] adding an
    example to
      the fileevent manpage. Minor modifications to get a better
      formatting. Report and patch by David N. Welton
      <[email protected]>.
    
    * The changes below fix [Bug #462317] where Expect tried to
    read
      more than was in the buffers and then blocked in the OS
    call as
      its pty channel driver provides no blockmodeproc through
    which
      the OS could be notified of blocking-behaviour. Because
    of this
      the general I/O core has to take more care than usual to
      preserve the semantics of non-blocking channels.
    
      The problem was reported by "Kevin O'Gorman"
      <[email protected]>.
    
    * generic/tclIO.c (Tcl_ReadRaw): Do not read from the driver if
      the channel is non-blocking and the fileevent causing the
    read
      was generated by a timer. We do not know if there is data
      available from the OS. Instead of going to the OS for
    more and
      potentially blocking we simply signal EWOULDBLOCK to the
    higher
      levels to cause the system to wait for true fileevents.
      (GetInput): Same as before.
      (ChannelTimerProc): Added set and clear of CHANNEL_TIMER_FEV.
    
    * generic/tclIO.h (CHANNEL_TIMER_FEV): New flag for
    channels. Is
      set if a fileevent was generated by a timer, the channel
    is not
      blocking and the driver did not provide a blockmodeproc.
    In that
      case the I/O core has to be especially careful about going to
      the driver for more data.
    
    
    
    
  2. login: "andreas_kupries"
  3. mimetype: "text/plain"
  4. username: "andreas_kupries"