* signal.cc (nanosleep): Do not wait twice for signal arrival.

This commit is contained in:
Thomas Pfaff 2003-05-06 19:39:10 +00:00
parent 4c6bc0ed42
commit 0bb7254f38
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2003-05-06 Thomas Pfaff <tpfaff@gmx.net>
* signal.cc (nanosleep): Do not wait twice for signal arrival.
2003-05-03 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/types.h: Fix erroneous definition of ino_t from

View File

@ -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);