summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dtable.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-02-27 00:34:40 +0000
committerChristopher Faylor <me@cgf.cx>2009-02-27 00:34:40 +0000
commitc7ef20e7faf221b35e18574dd8e107cccc21450a (patch)
tree4c358d15955e40c1828d0c031601e9f960652bcd /winsup/cygwin/dtable.cc
parentc636f27d48f153093d1532be50ae06311a75d309 (diff)
downloadcygnal-c7ef20e7faf221b35e18574dd8e107cccc21450a.tar.gz
cygnal-c7ef20e7faf221b35e18574dd8e107cccc21450a.tar.bz2
cygnal-c7ef20e7faf221b35e18574dd8e107cccc21450a.zip
* 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.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r--winsup/cygwin/dtable.cc5
1 files changed, 3 insertions, 2 deletions
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;