aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--System/Posix/Process/ByteString.hsc1
-rw-r--r--System/Posix/Process/Common.hsc10
-rw-r--r--changelog4
-rw-r--r--unix.cabal1
4 files changed, 15 insertions, 1 deletions
diff --git a/System/Posix/Process/ByteString.hsc b/System/Posix/Process/ByteString.hsc
index 30f40cd..4c6840a 100644
--- a/System/Posix/Process/ByteString.hsc
+++ b/System/Posix/Process/ByteString.hsc
@@ -22,6 +22,7 @@ module System.Posix.Process.ByteString (
-- ** Forking and executing
#ifdef __GLASGOW_HASKELL__
forkProcess,
+ forkProcessWithUnmask,
#endif
executeFile,
diff --git a/System/Posix/Process/Common.hsc b/System/Posix/Process/Common.hsc
index 1b504df..b760caa 100644
--- a/System/Posix/Process/Common.hsc
+++ b/System/Posix/Process/Common.hsc
@@ -1,4 +1,4 @@
-{-# LANGUAGE InterruptibleFFI #-}
+{-# LANGUAGE InterruptibleFFI, RankNTypes #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE Trustworthy #-}
#endif
@@ -23,6 +23,7 @@ module System.Posix.Process.Common (
-- ** Forking and executing
#ifdef __GLASGOW_HASKELL__
forkProcess,
+ forkProcessWithUnmask,
#endif
-- ** Exiting
@@ -306,6 +307,13 @@ forkProcess action = do
(\stable -> throwErrnoIfMinus1 "forkProcess" (forkProcessPrim stable))
foreign import ccall "forkProcess" forkProcessPrim :: StablePtr (IO ()) -> IO CPid
+
+-- | Variant of 'forkProcess' in the style of 'forkIOWithUnmask'.
+--
+-- /Since: 2.7.0.0/
+forkProcessWithUnmask :: ((forall a . IO a -> IO a) -> IO ()) -> IO ProcessID
+forkProcessWithUnmask action = forkProcess (action unsafeUnmask)
+
#endif /* __GLASGOW_HASKELL__ */
-- -----------------------------------------------------------------------------
diff --git a/changelog b/changelog
index ec0fbc8..ce72345 100644
--- a/changelog
+++ b/changelog
@@ -2,6 +2,8 @@
2.7.0.0 Nov 2013
+ * New `forkProcessWithUnmask` function in the style of `forkIOWithUnmask`
+
* Change `forkProcess` to inherit the exception masking state of its caller
* Add new `Bool` flag to `ProcessStatus(Terminated)` constructor
@@ -26,6 +28,8 @@
* Fix library detection of `shm*` on openSUSE (#8350)
+ * Minor documentation fixes/updates
+
* Update package to `cabal-version >= 1.10` format
2.6.0.1 Jan 2013
diff --git a/unix.cabal b/unix.cabal
index 2f729ba..3ad3c98 100644
--- a/unix.cabal
+++ b/unix.cabal
@@ -54,6 +54,7 @@ library
InterruptibleFFI
NoMonomorphismRestriction
OverloadedStrings
+ RankNTypes
if impl(ghc)
other-extensions: