* fhandler.cc (fhandler_base::close): Move setting isclosed() from here to

closed().
(fhandler_base_overlapped::close): Correct comment.
(fhandler_base_overlapped::destroy_overlapped): Signal overlapped event before
closing it to potentially wake up a waiting thread.
(fhandler_base_overlapped::wait_overlapped): Expand setting of err when closed
to encompass non-signal event.  Test for a cancel event before making
nonblocking decisions.
* syscalls.cc (close): Set closed flag here so that any concurrently executing
functions will be notified ASAP.
This commit is contained in:
Christopher Faylor
2011-12-18 04:07:47 +00:00
parent 1b23b30b29
commit d004a27971
3 changed files with 49 additions and 22 deletions

View File

@ -1373,6 +1373,7 @@ close (int fd)
res = -1;
else
{
cfd->isclosed (true);
res = cfd->close_with_arch ();
cfd.release ();
}