Skip to content
Snippets Groups Projects
Commit 17192d89 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel :man_dancing:
Browse files

Add `forkProcessWithUnmask` function


This seemed to be an obvious addition while working on #8433.

Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent 897d66ad
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ module System.Posix.Process.ByteString (
-- ** Forking and executing
#ifdef __GLASGOW_HASKELL__
forkProcess,
forkProcessWithUnmask,
#endif
executeFile,
......
{-# 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__ */
-- -----------------------------------------------------------------------------
......
......@@ -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
......
......@@ -54,6 +54,7 @@ library
InterruptibleFFI
NoMonomorphismRestriction
OverloadedStrings
RankNTypes
if impl(ghc)
other-extensions:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment