diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2022-05-09 00:54:35 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2022-05-09 00:54:35 +0900 |
commit | a6d06056e17ef81a13081f58710e56e4f964a07e (patch) | |
tree | 051a916d42b95fa8e7a088b5a3672266120cb96f | |
parent | cc94490f6e48b01f820e33d2461d05e72f1343bb (diff) | |
download | newlib-a6d06056e17ef81a13081f58710e56e4f964a07e.zip newlib-a6d06056e17ef81a13081f58710e56e4f964a07e.tar.gz newlib-a6d06056e17ef81a13081f58710e56e4f964a07e.tar.bz2 |
Cygwin: pty: Add missing attach_mutex guard.
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f6a7a6c..bb18d13 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; |