diff options
author | Christopher Faylor <me@cgf.cx> | 2001-11-01 23:48:34 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-11-01 23:48:34 +0000 |
commit | 53f00290819bd294d31d12bb93e8e5e887ad3aef (patch) | |
tree | f106c6e3e9c62c567b4aa8e42c0327f7845d4fde /winsup/cygwin/cygheap.h | |
parent | 1229d4f4eeec60957897cbf851adff5f61ab4df5 (diff) | |
download | newlib-53f00290819bd294d31d12bb93e8e5e887ad3aef.zip newlib-53f00290819bd294d31d12bb93e8e5e887ad3aef.tar.gz newlib-53f00290819bd294d31d12bb93e8e5e887ad3aef.tar.bz2 |
* 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.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index 5b86804..27196db 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 |