Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-11-02 02:48:34 +0300
committerChristopher Faylor <me@cgf.cx>2001-11-02 02:48:34 +0300
commit53f00290819bd294d31d12bb93e8e5e887ad3aef (patch)
treef106c6e3e9c62c567b4aa8e42c0327f7845d4fde /winsup/cygwin/cygheap.h
parent1229d4f4eeec60957897cbf851adff5f61ab4df5 (diff)
* cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not open.
* select.cc (fhandler_base::ready_for_read): Release an open guard mutex when exiting with an error condition. * syscalls.cc (_read): Check frequently for closed fd as a kludge until something better is invented.
Diffstat (limited to 'winsup/cygwin/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 5b868040f..27196db88 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -198,7 +198,13 @@ class cygheap_fdmanip
operator fhandler_base* &() {return *fh;}
void operator = (fhandler_base *fh) {*this->fh = fh;}
fhandler_base *operator -> () const {return *fh;}
- bool isopen () const {return *fh;}
+ bool isopen () const
+ {
+ if (*fh)
+ return true;
+ set_errno (EBADF);
+ return false;
+ }
};
class cygheap_fdnew : public cygheap_fdmanip