• Vladislav Vaintroub's avatar
    MDEV-4021 : Enable Ctrl-C handler when reading password, on Windows. · c6d31b27
    Vladislav Vaintroub authored
    Prior to this patch, _getch() was used to read password input from console. getch() has a property that it reads Ctrl-C as character with ASCII code 0x03, and disregards Ctrl-C handler for  current process. 
    The fix is to use ReadConsole() API instead of getch() , after setting console mode to ENABLE_PROCESSED_INPUT - this mode allows current process to handle Ctrl-C events.
    c6d31b27
get_password.c 5.44 KB