diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-11-08 20:49:52 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-11-08 20:49:52 +0300 |
commit | 80a429d20a345f222a4151d8f162fd8542244bb5 (patch) | |
tree | 26cdb5481b1fc093d2aaff3d598398c9687915c1 /winsup/cygwin/select.cc | |
parent | 036fd823dcf4cf161304a894258477d175b1c3f0 (diff) |
* select.cc: Set errno using set_sig_errno() throughout.
* signal.cc (signal): Always set SA_RESTART flag.
* syscalls.cc (_read): Revert previous patch.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r-- | winsup/cygwin/select.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 663997446..d3d64eda8 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -89,7 +89,7 @@ typedef long fd_mask; if (cygheap->fdtab.not_open ((s)->fd)) \ { \ (s)->saw_error = true; \ - set_errno (EBADF); \ + set_sig_errno (EBADF); \ return -1; \ } \ @@ -238,7 +238,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, { if (m > MAXIMUM_WAIT_OBJECTS) { - set_errno (EINVAL); + set_sig_errno (EINVAL); return -1; } if (!s->startup (s, this)) @@ -780,7 +780,7 @@ fhandler_tty_slave::ready_for_read (int fd, DWORD howlong) HANDLE w4[2]; if (cygheap->fdtab.not_open (fd)) { - set_errno (EBADF); + set_sig_errno (EBADF); return 0; } if (get_readahead_valid ()) @@ -793,17 +793,17 @@ fhandler_tty_slave::ready_for_read (int fd, DWORD howlong) switch (WaitForMultipleObjects (2, w4, FALSE, howlong)) { case WAIT_OBJECT_0: - set_errno (EINTR); + set_sig_errno (EINTR); return 0; case WAIT_OBJECT_0 + 1: return 1; case WAIT_FAILED: select_printf ("wait failed %E"); - set_errno (EINVAL); /* FIXME: correct errno? */ + set_sig_errno (EINVAL); /* FIXME: correct errno? */ return 0; default: if (!howlong) - set_errno (EAGAIN); + set_sig_errno (EAGAIN); return 0; } } @@ -1089,7 +1089,7 @@ fhandler_base::ready_for_read (int fd, DWORD howlong) if (fd >= 0 && cygheap->fdtab.not_open (fd)) { - set_errno (EBADF); + set_sig_errno (EBADF); avail = 0; break; } @@ -1097,13 +1097,13 @@ fhandler_base::ready_for_read (int fd, DWORD howlong) if (howlong != INFINITE) { if (!avail) - set_errno (EAGAIN); + set_sig_errno (EAGAIN); break; } if (WaitForSingleObject (signal_arrived, avail ? 0 : 10) == WAIT_OBJECT_0) { - set_errno (EINTR); + set_sig_errno (EINTR); avail = 0; break; } |