aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/select.cc
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2022-05-09 00:19:47 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2022-05-09 00:19:47 +0900
commitcc94490f6e48b01f820e33d2461d05e72f1343bb (patch)
tree6dcd223d51974f368bde064db4971badd817764d /winsup/cygwin/select.cc
parentaea6940043826f88f768d638dbbc6896ab9be494 (diff)
downloadnewlib-cc94490f6e48b01f820e33d2461d05e72f1343bb.zip
newlib-cc94490f6e48b01f820e33d2461d05e72f1343bb.tar.gz
newlib-cc94490f6e48b01f820e33d2461d05e72f1343bb.tar.bz2
Cygwin: pty: Avoid deadlock when pcon is started on console.
- Previously, "env SHELL=cmd script" command in console caused deadlock when starting cmd.exe. This patch fixes the issue.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 4f23dfd..0fa60bc 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -1125,7 +1125,6 @@ peek_console (select_record *me, bool)
{
if (fh->bg_check (SIGTTIN, true) <= bg_eof)
{
- release_attach_mutex ();
fh->release_input_mutex ();
return me->read_ready = true;
}
@@ -1142,7 +1141,6 @@ peek_console (select_record *me, bool)
&& global_sigs[SIGWINCH].sa_handler != SIG_DFL)
{
set_sig_errno (EINTR);
- release_attach_mutex ();
fh->release_input_mutex ();
return -1;
}