From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7868) id 4BBC1385842B; Sun, 8 May 2022 16:08:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BBC1385842B Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Takashi Yano To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_3-branch] Cygwin: pty: Add missing attach_mutex guard. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/cygwin-3_3-branch X-Git-Oldrev: 0f5046ef9f9d48aaaed283e019c20b2265121e69 X-Git-Newrev: 7b0d2d1e92f60524b8d93a02282c7d4e9021e9b6 Message-Id: <20220508160802.4BBC1385842B@sourceware.org> Date: Sun, 8 May 2022 16:08:02 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2022 16:08:02 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D7b0d2d1e92f= 60524b8d93a02282c7d4e9021e9b6 commit 7b0d2d1e92f60524b8d93a02282c7d4e9021e9b6 Author: Takashi Yano Date: Mon May 9 00:54:35 2022 +0900 Cygwin: pty: Add missing attach_mutex guard. Diff: --- winsup/cygwin/fhandler_tty.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 31f399f99..0cd69f3ca 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3497,6 +3497,7 @@ skip_create: HeapFree (GetProcessHeap (), 0, hp); } =20 + acquire_attach_mutex (mutex_timeout); if (get_ttyp ()->previous_code_page) SetConsoleCP (get_ttyp ()->previous_code_page); if (get_ttyp ()->previous_output_code_page) @@ -3527,6 +3528,7 @@ skip_create: mode |=3D DISABLE_NEWLINE_AUTO_RETURN; SetConsoleMode (hpConOut, mode); } + release_attach_mutex (); =20 return true;