diff options
| author | David Feuer <David.Feuer@gmail.com> | 2021-01-02 23:29:47 -0500 |
|---|---|---|
| committer | Ben Gamari <ben@well-typed.com> | 2021-01-04 00:13:54 -0500 |
| commit | d629e22d851dc3f9a76a395ae7d86d9a031259cf (patch) | |
| tree | 668337dc6541f2e877a7e6c0490185c2cfb05f96 | |
| parent | a0dcdfd1c91e0b13b5f1bf4c5e49b9593414b1d6 (diff) | |
| download | haskell-d629e22d851dc3f9a76a395ae7d86d9a031259cf.tar.gz | |
Revert "base: Make `open` calls interruptible"
This reverts commit 93c88c266eacd80a7f2a1754778167390c287b18.
This change did not accomplish its stated purpose, because
(assuming `openFileBlocking` is called with `bracket`),
`throwOnMinus1Retry` would just retry the interrupted
`c_safe_open` call without first delivering pending
exceptions using `allowInterrupt`.
| -rw-r--r-- | libraries/base/System/Posix/Internals.hs | 4 | ||||
| -rw-r--r-- | libraries/base/changelog.md | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs index ea8ddf2173..15a02ff1e1 100644 --- a/libraries/base/System/Posix/Internals.hs +++ b/libraries/base/System/Posix/Internals.hs @@ -1,5 +1,4 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE InterruptibleFFI #-} {-# LANGUAGE CPP, NoImplicitPrelude, CApiFFI #-} {-# OPTIONS_HADDOCK not-home #-} @@ -356,8 +355,7 @@ type CFilePath = CWString foreign import ccall unsafe "HsBase.h __hscore_open" c_open :: CFilePath -> CInt -> CMode -> IO CInt --- e.g. use `interruptible` rather than `safe` due to #17912. -foreign import ccall interruptible "HsBase.h __hscore_open" +foreign import ccall safe "HsBase.h __hscore_open" c_safe_open :: CFilePath -> CInt -> CMode -> IO CInt foreign import ccall unsafe "HsBase.h __hscore_fstat" diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index 7574cb9eaf..3703496b97 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -1,10 +1,7 @@ # Changelog for [`base` package](http://hackage.haskell.org/package/base) ## 4.15.0.0 *TBA* - - * `openFile` now calls the `open` system call with an `interruptible` FFI - call, ensuring that the call can be interrupted with `SIGINT` on POSIX - systems. + * TODO * Add `hGetContents'`, `getContents'`, and `readFile'` in `System.IO`: Strict IO variants of `hGetContents`, `getContents`, and `readFile`. |
