ENH generalize internal shell functions
This commit is contained in:
parent
7e9d7d6d4b
commit
e76050a7a1
|
@ -60,11 +60,11 @@ import qualified XMonad.Util.Run as XR
|
|||
-- In contrast with high-level APIs like 'System.Process', this will leave no
|
||||
-- trailing data structures to clean up, at the cost of being gross to look at
|
||||
-- and possibly more error-prone.
|
||||
runProcess :: P.ProcessConfig a b c -> IO ExitCode
|
||||
runProcess :: MonadUnliftIO m => P.ProcessConfig a b c -> m ExitCode
|
||||
runProcess = withDefaultSignalHandlers . P.runProcess
|
||||
|
||||
-- | Run an action without xmonad's signal handlers.
|
||||
withDefaultSignalHandlers :: IO a -> IO a
|
||||
withDefaultSignalHandlers :: MonadUnliftIO m => m a -> m a
|
||||
withDefaultSignalHandlers =
|
||||
bracket_ X.uninstallSignalHandlers X.installSignalHandlers
|
||||
|
||||
|
|
Loading…
Reference in New Issue