From c7ef20e7faf221b35e18574dd8e107cccc21450a Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 27 Feb 2009 00:34:40 +0000 Subject: * dtable.cc (dtable::select_read): Add ability to override fh. * fhandler.h (fhandler_fifo::select_read): Declare new function. (fhandler_fifo::select_write): Ditto. (fhandler_fifo::select_except): Ditto. * select.cc (peek_pipe): Treat certain classes of pipe errors as "no data". (fhandler_fifo::select_read): Define new function. (fhandler_fifo::select_write): Ditto. (fhandler_fifo::select_except): Ditto. * shared_info.h (CURR_SHARED_MAGIC): Update. --- winsup/cygwin/dtable.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/dtable.cc') diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 4c002908e..30f78e1ae 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -1,7 +1,7 @@ /* dtable.cc: file descriptor support. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Red Hat, Inc. + 2005, 2006, 2007, 2008, 2009 Red Hat, Inc. This file is part of Cygwin. @@ -640,7 +640,8 @@ dtable::select_read (int fd, select_record *s) fhandler_base *fh = fds[fd]; s = fh->select_read (s); s->fd = fd; - s->fh = fh; + if (!s->fh) + s->fh = fh; s->thread_errno = 0; debug_printf ("%s fd %d", fh->get_name (), fd); return s; -- cgit v1.2.3