aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2022-03-18 23:28:36 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2022-03-18 23:30:09 +0900
commit8f31cda1af64dee07f4aad4382758a756209132b (patch)
tree42a4adafe699a7e3534dc51b3e1990234a284382 /winsup
parent4be4da65efbfb7656cdcab2bfcaff1d7b068a8c6 (diff)
downloadnewlib-8f31cda1af64dee07f4aad4382758a756209132b.zip
newlib-8f31cda1af64dee07f4aad4382758a756209132b.tar.gz
newlib-8f31cda1af64dee07f4aad4382758a756209132b.tar.bz2
Cygwin: console: Add attach_mutex guard that was not added.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_console.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index b52ecfc..16850ae 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -361,7 +361,9 @@ remove_record:
{
if (total_read + j - i >= n)
{ /* Something is wrong. Giving up. */
+ acquire_attach_mutex (mutex_timeout);
WriteConsoleInputW (p->input_handle, tmp, n, &n);
+ release_attach_mutex ();
goto skip_writeback;
}
input_rec[total_read + j - i] = tmp[j];