From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7868) id 8B0AF385842B; Sun, 8 May 2022 16:08:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B0AF385842B 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: pty: Add missing attach_mutex guard. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: cc94490f6e48b01f820e33d2461d05e72f1343bb X-Git-Newrev: a6d06056e17ef81a13081f58710e56e4f964a07e Message-Id: <20220508160823.8B0AF385842B@sourceware.org> Date: Sun, 8 May 2022 16:08:23 +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:23 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Da6d06056e17= ef81a13081f58710e56e4f964a07e commit a6d06056e17ef81a13081f58710e56e4f964a07e 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 f6a7a6cf9..bb18d139e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3422,6 +3422,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) @@ -3452,6 +3453,7 @@ skip_create: mode |=3D DISABLE_NEWLINE_AUTO_RETURN; SetConsoleMode (hpConOut, mode); } + release_attach_mutex (); =20 return true;