From 169c465a83ef690c2f84ef563c5b56062ee2cb13 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 12 Jan 2005 22:40:46 +0000 Subject: Reorganize header file inclusion throughout so that cygerrno.h comes first. * fhandler.h (select_record::thread_errno): Save any encountered errno here. (select_record::set_select_errno): New function. (select_record::saw_error): New function. (select_record::select_record): Initialize thread_errno to zero. * select.cc (set_handle_or_return_if_not_open): Set thread_errno on failure. (select_stuff::wait): Record errno for later resurrection in calling thread. (peek_serial): Ditto. --- winsup/cygwin/dtable.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/dtable.cc') diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 38e5057cf..a699553c1 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -584,7 +584,7 @@ dtable::select_read (int fd, select_record *s) s = fh->select_read (s); s->fd = fd; s->fh = fh; - s->saw_error = 0; + s->thread_errno = 0; debug_printf ("%s fd %d", fh->get_name (), fd); return s; } @@ -601,7 +601,7 @@ dtable::select_write (int fd, select_record *s) s = fh->select_write (s); s->fd = fd; s->fh = fh; - s->saw_error = 0; + s->thread_errno = 0; debug_printf ("%s fd %d", fh->get_name (), fd); return s; } @@ -618,7 +618,7 @@ dtable::select_except (int fd, select_record *s) s = fh->select_except (s); s->fd = fd; s->fh = fh; - s->saw_error = 0; + s->thread_errno = 0; debug_printf ("%s fd %d", fh->get_name (), fd); return s; } -- cgit v1.2.3