Skip to content
Tcl Source Code History Of Ticket 5adc3506834c2aac
Login

History Of Ticket 5adc3506834c2aac

Artifacts Associated With Ticket 5adc3506834c2aac

  1. Ticket change [338473289a] (rid 140438) by wish72 on 2014-10-26 04:58:04:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      My program repeats attempts to read file after EOF condition appeared on it. The program looks for any new lines appended to that file.
      
      The program works with Tcl 8.5, but it doesn't see any new lines with Tcl 8.6.
      
      Here's the test:
      
      $ cat read-after-eof.tcl
      puts "Tcl patchlevel: [info patchlevel]"
      set h [open ./read-after-eof.txt]
      read $h
      set text [clock seconds]
      exec cat >>./read-after-eof.txt << $text
      puts "gets after EOF returns: '[gets $h]'"
      
      $ echo "" >read-after-eof.txt
      $ /opt/ActiveTcl-8.5/bin/tclsh read-after-eof.tcl
      Tcl patchlevel: 8.5.15
      gets after EOF returns: '1414267142'
      
      $ echo "" >read-after-eof.txt
      $ /opt/ActiveTcl-8.6/bin/tclsh read-after-eof.tcl
      Tcl patchlevel: 8.6.2
      gets after EOF returns: ''
      
    5. foundin initialized to: "8.6.2"
    6. is_private initialized to: "0"
    7. login: "wish72"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "50e83720d6a6ab957a346d2afa6925def62d4f1e"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "wish72"
    14. subsystem initialized to: "16. Commands A-H"
    15. title initialized to:
      'gets' repeated after EOF in Tcl 8.6.2 doesn't work
      
    16. type initialized to: "Bug"
  2. Ticket change [08c9908eeb] (rid 140444) by dgp on 2014-10-26 19:00:16:

    1. assignee changed to: "dgp"
    2. icomment:
      
      You will find the same results in 8.5.16 and 8.6.17.
      
      A reworking of I/O leading up to 8.5.16 and 8.6.2
      included as one of its premises that "EOF" means "end of
      any new bytes to be read from this channel".  There a
      number of  reasons for this, which I won't go into in detail
      right at the moment.  (Better to be correct than to be quick.)
      
      While I ponder the use case in this ticket and whether
      and how it might prompt an effort to recover what it
      desires, I can at least offer a way to accomplish what
      is desired.
      
      Between the [exec cat....]  and the final [puts ...] commands
      in the demo script above, insert this command:
      
      seek $h 0 current
      
      The resulting modified script should work as you wish
      in all new and old Tcl interps.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. priority changed to: "7 High"
    6. title changed to: "'gets' repeated after EOF doesn't work"
  3. Ticket change [06d753c079] (rid 140445) by dgp on 2014-10-26 19:01:23:

    1. icomment:
      
      > You will find the same results in 8.5.16 and 8.6.17.
      
      That should refer to 8.5.16 and 8.5.17.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [5170d988c9] (rid 140457) by dgp on 2014-10-28 20:11:58:

    1. icomment:
      
      See bug-5adc350683 branch for work in progress
      restoring the capability, as well as addressing what
      the non-permanence of EOF on a read channel means
      for things like channel stacks and transformations.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  5. Ticket change [f3b818391c] (rid 140469) by dgp on 2014-10-29 20:34:09:

    1. icomment:
      
      The key routine here is GetInput().  Every caller
      of GetInput() has to (when otherwise warranted) make
      at least one call to GetInput() -- even if EOF is
      already set on the channel -- in order to enable
      the moving past EOF, and reading whatever new data
      may be available now.
      
      On the other hand, every caller of GetInput() must
      not make an additional call to GetInput() after
      a call to GetInput() has left EOF set in the channel.
      As soon as a call to GetInput() leaves EOF set in
      the channel, the caller must be on a path to return
      to its caller without calling GetInput() again.  This
      must be achieved so that a fleeting EOF condition
      is not missed by the caller.
      
      There are 4 callers of GetInput(): TclGetsObjBinary(),
      FilterInputBytes(), DoReadChars(), and DoRead().
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [585876b683] (rid 140575) by dgp on 2014-11-06 16:38:18:

    1. closedate changed to: "2456968.19326843"
    2. closer changed to: "dgp"
    3. icomment:
      
      Fix committed for 8.5.18 and 8.6.3.
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"