Repository navigation
Fixed Ctrl-C handling
Changed default behavior as suggested by @rollingmoai so that the default case is now to send Ctrl-C, Ctrl-Z etc on to the server for handling vs. letting the default Windows handler close SSHPass. Also added the -c / --ctrlc option to allow callers to specify local handling or server handling. In the local case, we now handle the ctrl-c within SSHPass in order to restore the original console settings, as opposed to letting Windows close the sshpass process without doing any "cleanup".
Additionally found that restoring the original console settings was not always happening; it was a race condition to see if the input thread would finish execution before the main thread exited. If the input thread did not finish, then the console mode was not properly restored. Tested under Windows 11 to ensure clean restore of state both with -clocal and -cserver.