Skip to content
  • stijn's avatar
    windows: Better handling of Ctrl-C · a5aa03ac
    stijn authored
    This builds upon the changes made in 21950463. Using signal() does not
    produce reliable results so SetConsoleCtrlHandler is used, and the handler
    is installed only once during initialization instead of removing it in
    mp_hal_set_interrupt_char when it is not strictly needed anymore, since
    removing it might lead to Ctrl-C events being missed because they are
    fired on a seperate thread which might only become alive after the handler
    was removed.
    a5aa03ac