From c16e73043ee4249871bd2113dc71dac0b7c08c90 Mon Sep 17 00:00:00 2001 From: Takashi Yano Date: Mon, 17 Feb 2020 21:46:27 +0900 Subject: [PATCH] Cygwin: console: Fix code for restoring console mode. - Commit 774b8996d1f3e535e8267be4eb8e751d756c2cec has a bug that restores console output mode into console input. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 2afb5c529..9bfee64d3 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1122,7 +1122,7 @@ fhandler_console::close () &obi, sizeof obi, NULL); if (NT_SUCCESS (status) && obi.HandleCount == 1) if (orig_conout_mode != (DWORD) -1) - SetConsoleMode (get_handle (), orig_conout_mode); + SetConsoleMode (get_output_handle (), orig_conout_mode); release_output_mutex ();