Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 338473289a3664382388ebf2349a06973299e0de
Ticket: 5adc3506834c2aacc613cd0df7de6f07a728c0aa
'gets' repeated after EOF doesn't work
User & Date: wish72 on 2014-10-26 04:58:04
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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 changed to: "8.6.2"
  6. is_private changed to: "0"
  7. login: "wish72"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "50e83720d6a6ab957a346d2afa6925def62d4f1e"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "wish72"
  14. subsystem changed to: "16. Commands A-H"
  15. title changed to:
    'gets' repeated after EOF in Tcl 8.6.2 doesn't work
    
  16. type changed to: "Bug"