Cygwin: console: Fix code for restoring console mode.

- Commit 774b8996d1 has a bug that
  restores console output mode into console input. This patch fixes
  the issue.
This commit is contained in:
Takashi Yano 2020-02-17 21:46:27 +09:00 committed by Corinna Vinschen
parent 6afb1ba504
commit c16e73043e

View File

@ -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 ();