* 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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user