Make openFile exception safe
Make openFile exception safe
-
openFile
could sometimes leak file descriptors if it received an asynchronous exception (#19114 (closed), #19115). Fix this on POSIX. -
openFile
and more importantlyopenFileBlocking
could not be interrupted effectively during theopen
system call (#17912). Fix this on POSIX. -
Implement
readFile'
usingwithFile
to ensure the file is closed promptly on exception.
Addresses #17912, #19114 (closed), and #19115 on POSIX systems, but not on Windows.