Commit ab7e650c authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix final warning in System.Process.Internals

parent eef4408b
{-# LANGUAGE CPP, ForeignFunctionInterface, RecordWildCards #-}
{-# OPTIONS_HADDOCK hide #-}
-- TODO: Remove this pragma:
{-# OPTIONS -fno-warn-deprecations #-}
#ifdef __GLASGOW_HASKELL__
{-# LANGUAGE Trustworthy #-}
#endif
......@@ -139,12 +137,11 @@ throwErrnoIfBadPHandle :: String -> IO PHANDLE -> IO PHANDLE
throwErrnoIfBadPHandle = throwErrnoIfNull
-- On Windows, we have to close this HANDLE when it is no longer required,
-- hence we add a finalizer to it, using an IORef as the box on which to
-- attach the finalizer.
-- hence we add a finalizer to it
mkProcessHandle :: PHANDLE -> IO ProcessHandle
mkProcessHandle h = do
m <- newMVar (OpenHandle h)
addMVarFinalizer m (processHandleFinaliser m)
_ <- mkWeakMVar m (processHandleFinaliser m)
return (ProcessHandle m)
processHandleFinaliser :: MVar ProcessHandle__ -> IO ()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment