summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/System/Posix/Internals.hs4
-rw-r--r--libraries/base/changelog.md5
2 files changed, 7 insertions, 2 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs
index 15a02ff1e1..ea8ddf2173 100644
--- a/libraries/base/System/Posix/Internals.hs
+++ b/libraries/base/System/Posix/Internals.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE InterruptibleFFI #-}
{-# LANGUAGE CPP, NoImplicitPrelude, CApiFFI #-}
{-# OPTIONS_HADDOCK not-home #-}
@@ -355,7 +356,8 @@ type CFilePath = CWString
foreign import ccall unsafe "HsBase.h __hscore_open"
c_open :: CFilePath -> CInt -> CMode -> IO CInt
-foreign import ccall safe "HsBase.h __hscore_open"
+-- e.g. use `interruptible` rather than `safe` due to #17912.
+foreign import ccall interruptible "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 026de1df82..e667b3fef9 100644
--- a/libraries/base/changelog.md
+++ b/libraries/base/changelog.md
@@ -1,7 +1,10 @@
# Changelog for [`base` package](http://hackage.haskell.org/package/base)
## 4.15.0.0 *TBA*
- * TODO
+
+ * `openFile` now calls the `open` system call with an `interruptible` FFI
+ call, ensuring that the call can be interrupted with `SIGINT` on POSIX
+ systems.
## 4.14.0.0 *TBA*
* Bundled with GHC 8.10.1