summaryrefslogtreecommitdiff
path: root/docs/users_guide
diff options
context:
space:
mode:
authorDavid Feuer <david.feuer@gmail.com>2020-12-24 19:24:24 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-22 18:26:50 -0500
commitf90487cacb16e8398c4c4a84de5a1e33ac4e7867 (patch)
tree790477c04a73701eb4b7100a12b936c7a8031028 /docs/users_guide
parent4196969c53c55191e644d9eb258c14c2bc8467da (diff)
downloadhaskell-f90487cacb16e8398c4c4a84de5a1e33ac4e7867.tar.gz
Make openFile exception safe
* `openFile` could sometimes leak file descriptors if it received an asynchronous exception (#19114, #19115). Fix this on POSIX. * `openFile` and more importantly `openFileBlocking` could not be interrupted effectively during the `open` system call (#17912). Fix this on POSIX. * Implement `readFile'` using `withFile` to ensure the file is closed promptly on exception. * Avoid `bracket` in `withFile`, reducing the duration of masking. Closes #19130. Addresses #17912, #19114, and #19115 on POSIX systems, but not on Windows.
Diffstat (limited to 'docs/users_guide')
-rw-r--r--docs/users_guide/9.2.1-notes.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/users_guide/9.2.1-notes.rst b/docs/users_guide/9.2.1-notes.rst
index e06aa5b11b..06134387f3 100644
--- a/docs/users_guide/9.2.1-notes.rst
+++ b/docs/users_guide/9.2.1-notes.rst
@@ -197,3 +197,6 @@ Runtime system
charVal :: forall n proxy. KnownChar n => proxy n -> Char
charVal' :: forall n. KnownChar n => Proxy# n -> Char
+
+- On POSIX, ``System.IO.openFile`` can no longer leak a file descriptor if it
+ is interrupted by an asynchronous exception (#19114, #19115).