summaryrefslogtreecommitdiff
path: root/version.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-23 18:19:07 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-23 18:19:07 +0000
commitf9fcffedf608e5717851553d99a8ce4879eaa4d3 (patch)
tree03342c6bff60d69c8b9bc16872564451084ce8c1 /version.h
parentec9e886b6397e19fe0be5fcf5e3e1363c91f33fd (diff)
io.c (fptr_finalize_flush): close race leading to EBADF
The previous ordering was: a) notify waiting_fd threads of impending close b) waiting on busy list from a) c) invalidate fptr->fd d) calling close() However, it was possible for a new thread to enter the waiting_fd list while scheduling on b), leading to EBADF from those threads when we hit d). Instead, we now avoid triggering EBADF in other threads by reordering b) and c) a) notify waiting_fd threads of impending close c) invalidate fptr->fd b) waiting on busy list from a) d) calling close() cf. http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1474526 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'version.h')
0 files changed, 0 insertions, 0 deletions