From 0bb7254f38500a273041f45b91b80f83f824380e Mon Sep 17 00:00:00 2001 From: Thomas Pfaff Date: Tue, 6 May 2003 19:39:10 +0000 Subject: [PATCH] * signal.cc (nanosleep): Do not wait twice for signal arrival. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/signal.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c625811ff..5bd1942b3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2003-05-06 Thomas Pfaff + + * signal.cc (nanosleep): Do not wait twice for signal arrival. + 2003-05-03 Corinna Vinschen * include/cygwin/types.h: Fix erroneous definition of ino_t from diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 5cadc22bc..547a1285d 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -88,7 +88,7 @@ nanosleep (const struct timespec *rqtp, struct timespec *rmtp) int rc = pthread::cancelable_wait (signal_arrived, req); DWORD now = GetTickCount (); DWORD rem = (rc == WAIT_TIMEOUT || now >= end_time) ? 0 : end_time - now; - if (WaitForSingleObject (signal_arrived, 0) == WAIT_OBJECT_0) + if (rc == WAIT_OBJECT_0) { (void) thisframe.call_signal_handler (); set_errno (EINTR);