diff options
author | David Feuer <david.feuer@gmail.com> | 2020-12-24 19:24:24 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-22 18:26:50 -0500 |
commit | f90487cacb16e8398c4c4a84de5a1e33ac4e7867 (patch) | |
tree | 790477c04a73701eb4b7100a12b936c7a8031028 /libraries/base/changelog.md | |
parent | 4196969c53c55191e644d9eb258c14c2bc8467da (diff) | |
download | haskell-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 'libraries/base/changelog.md')
-rw-r--r-- | libraries/base/changelog.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index 06633d9b07..cc0100e585 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -25,6 +25,11 @@ `newAlignedPinnedByteArray#` actually always assumed this but we didn't document this fact in the user facing API until now. + `Generic1`, and `Data` instances for `GHC.Tuple.Solo`. + + * Under POSIX, `System.IO.openFile` will no longer leak a file descriptor if it + is interrupted by an asynchronous exception (#19114, #19115). + ## 4.15.0.0 *TBA* * `openFile` now calls the `open` system call with an `interruptible` FFI |