Skip to content
Tcl Source Code History Of Ticket e66e44444023ee25
Login

History Of Ticket e66e44444023ee25

Artifacts Associated With Ticket e66e44444023ee25

  1. Ticket change [4e59793eb8] (rid 141401) by apnadkarni on 2015-03-19 02:33:21:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Background: Windows allows Ctrl-C, Ctrl-Break etc. to be trapped by the application via the SetConsoleCtrlHandler call. Although Tcl itself does not support this in the core, extensions such as twapi do. However, a feature/bug/quirk in the tclWinConsole.c:ReadConsoleBytes function makes this trapping ineffective. As documented in MSDN, a Ctrl-C results in the Windows ReadConsole call returning successfully but with 0 bytes read. This gets funneled up the Tcl channel system as EOF on stdin and consequently the REPL loop exits.
      
      The proposed change would be to change ReadConsoleBytes to detect this (GetLastError() returns ERROR_OPERATION_ABORTED) and simply repost the ReadConsole.
      
      There will be no observed change in the default behaviour because the default OS handler (run in a separate thread) will still exit the process on a Ctrl-C. However, applications that use extensions to trap Ctrl-C by replacing the default handler will work as expected.
      
      The proposed change is in the Windows-specific code and will not affect other platforms.
      
      Reference: http://stackoverflow.com/questions/27903208/tcl-and-ctrl-c-in-windows-console/27904696#27904696
      
    5. is_private initialized to: "0"
    6. login: "apnadkarni"
    7. priority initialized to: "5 Medium"
    8. resolution initialized to: "None"
    9. severity initialized to: "Minor"
    10. status initialized to: "Open"
    11. submitter initialized to: "apnadkarni"
    12. subsystem initialized to: "25. Channel System"
    13. title initialized to: "Change Ctrl-C handling in Windows console"
    14. type initialized to: "RFE"
  2. Ticket change [1ecf5d36e1] (rid 141402) by apnadkarni on 2015-03-19 02:39:13:

    1. icomment:
      Changed to Bug because rethinking the issue, treating the Ctrl-C as EOF seems just wrong.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
    4. type changed to: "Bug"
  3. Ticket change [6a271bc48f] (rid 141403) by jan.nijtmans on 2015-03-19 09:00:58:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      This change looks good to me. Please go ahead and either provide a patch or just commit it. I will be happy to apply the patch and/or to test it.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"
  4. Ticket change [c2460634c0] (rid 141407) by apnadkarni on 2015-03-19 10:46:31:

    1. icomment: "Committed fix in checkin [4368d9eefc]"
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  5. Ticket change [34af4b4b70] (rid 141700) by dgp on 2015-05-01 14:51:32:

    1. icomment: "status?"
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [8faa35d792] (rid 141703) by jan.nijtmans on 2015-05-01 15:15:18:

    1. closedate changed to: "2457144.1356339"
    2. closer changed to: "jan.nijtmans"
    3. icomment: "Fix in [4368d9eefc] looks fine to me, so closing."
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"