From 0b4f758e8a5e87eafa04fd05313e153372481aee Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 24 Nov 2024 14:48:17 +0000 Subject: [PATCH] Windows: make is_interactive() match Unix. This reverts the change to is_interactive() by commit 80aed962862ec73, which switched it to using the new conio system. Now we're back to doing it the same way as we used to: we check if stdin is a console. The only use of is_interactive() on Windows is deciding whether to present the console antispoof prompt. (On Unix it has an additional use in cmdgen, for deciding whether to emit progress reports, but on Windows that doesn't come up). On Unix this is based on stdin being a tty, which means that a command such as "plink host do stuff hin_is_console; - conio_free(conio); - return toret; + return is_console_handle(GetStdHandle(STD_INPUT_HANDLE)); } bool console_antispoof_prompt = true;