Cygwin: console: Add attach_mutex guard that was not added.

This commit is contained in:
Takashi Yano 2022-03-18 23:28:36 +09:00
parent fcb182387a
commit 8d3271b7fa
1 changed files with 2 additions and 0 deletions

View File

@ -362,7 +362,9 @@ remove_record:
{ {
if (total_read + j - i >= n) if (total_read + j - i >= n)
{ /* Something is wrong. Giving up. */ { /* Something is wrong. Giving up. */
acquire_attach_mutex (mutex_timeout);
WriteConsoleInputW (p->input_handle, tmp, n, &n); WriteConsoleInputW (p->input_handle, tmp, n, &n);
release_attach_mutex ();
goto skip_writeback; goto skip_writeback;
} }
input_rec[total_read + j - i] = tmp[j]; input_rec[total_read + j - i] = tmp[j];