Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-09-27 02:24:09 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-27 02:24:09 +0400
commit5fe74396e949b601e54ddb00fa7e486d1be18013 (patch)
treeb0f3934a0fa68caa0fea6559a7c014fc9d068929 /winsup
parentc918cf9421b0888e60990f411718fe36b67875c9 (diff)
* select.cc (peek_pipe): REALLY only grab mutex when we actually got something
from the pipe.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/select.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 708462f73..e14725dc6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 26 16:02:35 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * select.cc (peek_pipe): REALLY only grab mutex when we actually got
+ something from the pipe.
+
Tue Sep 25 21:25:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_cond::BroadCast): Use address with verifyable_object_isvalid().
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index bef4e8ac0..2307e297e 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -454,7 +454,8 @@ peek_pipe (select_record *s, int ignra, HANDLE guard_mutex = NULL)
select_printf ("%s, PeekNamedPipe failed, %E", fh->get_name ());
n = -1;
}
- else if (guard_mutex && WaitForSingleObject (guard_mutex, 0) != WAIT_OBJECT_0)
+ else if (n && guard_mutex
+ && WaitForSingleObject (guard_mutex, 0) != WAIT_OBJECT_0)
{
select_printf ("%s, couldn't get mutex %p, %E", fh->get_name (),
guard_mutex);