Skip to content
Tcl Source Code History Of Ticket 3389289
Login

History Of Ticket 3389289

Artifacts Associated With Ticket 3389289

  1. Ticket change [4c53d4882b] (rid 126873) by ferrieux on 2011-08-09 22:52:19:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The CloseChannel function is not called on stdout when exiting. As a consequence, the output eofchar is not written.
      Note that proper behavior is restored by forcing a Finalize in 8.6 (eg with -DPURIFY).
      This bug was already present in 8.5 and allowed test chan-4.6 to run without side effect (detected in 3389251)
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "7 High"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "ferrieux"
    10. subsystem initialized to: "25. Channel System"
    11. title initialized to: "Incomplete closure of stdout on exit"
    12. type initialized to: "Bug"
  2. Ticket change [9735a580d7] (rid 106465) by ferrieux on 2011-08-10 06:28:59:

    1. icomment:
      Was also present in 8.4.
      Easy way to check, all versions: pass this script as arg to tclsh (noninteractive):
      
       fconfigure stdout -eofchar [list {} \x27]
       close stdout
      
      You should see a single quote: ' 
      Then comment out the [close stdout], the single quote disappears, in 8.[456].
      (except in 8.6HEAD+PURIFY, because of finalization)
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  3. Ticket change [be9336f35a] (rid 102094) by ferrieux on 2012-12-10 22:06:51:

    1. assignee changed to: "ferrieux"
    2. closedate changed to: "2012-12-10T15:06:51"
    3. closer changed to: "ferrieux"
    4. icomment:
      The reason is a subtle dance between channel refcounts, and per-interp
      vs. global responsibility, made even more complex by the special case
      of standard channels (though regular channels have the same problem).
      The bottom line is that CloseChannel (not to be confused with
      Tcl_Close, nor ChanClose, nor with the channel's closeProc... argh)
      fails to be called at exit.
      
      In 8.6 the issue gets a different light since we insist on making
      [exit] as quick and as deadlock-free as possible, so we skip many
      otherwise useless (if not outright dangerous) finalizers... among
      which the interp's deletion, which gets the final chance to call
      CloseChannel (as can be seen by forcing TCL_FINALIZE_ON_EXIT).
      
      In this context, closing the issue as "Won't Fix" because:
      
      - output-eofchar-plus-exit-minus-close has never worked in Tcl's history
      
      - no explicit promise has ever been made in the manpages
      
      - eofchar is a DOS-only notion of dubious use nowadays
      
      - fixing it would require (a) either an overhaul of the IO finalization
        code (b) or an increased risk for [exit] to revive tricky finalization bugs
      
      Note that I'm setting myself as assignee, ready to listen to arguments from people with a strong case for reopening.
      
      
    5. login: "ferrieux"
    6. mimetype: "text/plain"
    7. resolution changed to: "Wont Fix"
    8. status changed to: "Closed"
    9. username: "ferrieux"