From a3ec080b35b49d52c456fdc2342e8a5290ab307f Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 14 Jan 2001 19:08:30 +0000 Subject: [PATCH] * syscalls.cc (_read): Use more lightweight method for determining if read has been interrupted by a signal. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/syscalls.cc | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 506f5229c..8de1b9628 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Sun Jan 14 14:07:50 2001 Christopher Faylor + + * syscalls.cc (_read): Use more lightweight method for determining if + read has been interrupted by a signal. + Fri Jan 12 00:35:15 2001 Christopher Faylor * debug.h: Add regparm attributes to some functions. diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 0f6834422..0e6b631fa 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -259,8 +259,7 @@ beg: } out: - if (res < 0 && WaitForSingleObject (signal_arrived, 0) == WAIT_OBJECT_0 && - call_signal_handler ()) + if (res < 0 && get_errno () == EINTR && call_signal_handler ()) goto beg; syscall_printf ("%d = read (%d<%s>, %p, %d), bin %d, errno %d", res, fd, fh->get_name (), ptr, len, fh->get_r_binary (), get_errno ());