From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106060 invoked by alias); 17 Feb 2020 12:57:31 -0000 Mailing-List: contact cygwin-cvs-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-cvs-owner@cygwin.com Received: (qmail 106044 invoked by uid 9078); 17 Feb 2020 12:57:30 -0000 Date: Mon, 17 Feb 2020 12:57:00 -0000 Message-ID: <20200217125730.106043.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: console: Fix code for restoring console mode. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: 6afb1ba5044a309063065b82d08a22fbbc9ef5de X-Git-Newrev: c16e73043ee4249871bd2113dc71dac0b7c08c90 X-SW-Source: 2020-q1/txt/msg00066.txt https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c16e73043ee4249871bd2113dc71dac0b7c08c90 commit c16e73043ee4249871bd2113dc71dac0b7c08c90 Author: Takashi Yano Date: Mon Feb 17 21:46:27 2020 +0900 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. Diff: --- 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 2afb5c5..9bfee64 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 ();