public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: pty: Add missing attach_mutex guard.
@ 2022-05-08 16:08 Takashi Yano
  0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2022-05-08 16:08 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a6d06056e17ef81a13081f58710e56e4f964a07e

commit a6d06056e17ef81a13081f58710e56e4f964a07e
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
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);
     }
 
+  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 |= DISABLE_NEWLINE_AUTO_RETURN;
       SetConsoleMode (hpConOut, mode);
     }
+  release_attach_mutex ();
 
   return true;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-08 16:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-08 16:08 [newlib-cygwin] Cygwin: pty: Add missing attach_mutex guard Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).