diff options
author | Spencer Janssen <spencerjanssen@gmail.com> | 2009-12-23 07:45:58 +0100 |
---|---|---|
committer | Spencer Janssen <spencerjanssen@gmail.com> | 2009-12-23 07:45:58 +0100 |
commit | be8064767c77a02987f9eae7392f5d479ce9d5be (patch) | |
tree | 1ffc26e00a3a3d80aefca17934f044123f1dc9a9 /XMonad/Util/Run.hs | |
parent | f41f402f3584bf18885bf894345cb5d007643a4d (diff) | |
download | XMonadContrib-be8064767c77a02987f9eae7392f5d479ce9d5be.tar.gz XMonadContrib-be8064767c77a02987f9eae7392f5d479ce9d5be.tar.xz XMonadContrib-be8064767c77a02987f9eae7392f5d479ce9d5be.zip |
Update all uses of forkProcess to xfork
Ignore-this: 963a4ddf1d2f4096bbb8969b173cd0c1
darcs-hash:20091223064558-25a6b-b8cdfb14005aa9b60d9cbac7b257a6fc22b8eac4.gz
Diffstat (limited to 'XMonad/Util/Run.hs')
-rw-r--r-- | XMonad/Util/Run.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Util/Run.hs b/XMonad/Util/Run.hs index 1e82b55..fe1949c 100644 --- a/XMonad/Util/Run.hs +++ b/XMonad/Util/Run.hs @@ -32,7 +32,7 @@ module XMonad.Util.Run ( ) where import System.Posix.IO -import System.Posix.Process (executeFile, forkProcess, createSession) +import System.Posix.Process (executeFile, createSession) import Control.Concurrent (threadDelay) import Control.Exception (try) -- use OldException with base 4 import System.IO @@ -67,7 +67,7 @@ runProcessWithInput cmd args input = io $ do -- | Wait is in µs (microseconds) runProcessWithInputAndWait :: MonadIO m => FilePath -> [String] -> String -> Int -> m () runProcessWithInputAndWait cmd args input timeout = io $ do - forkProcess $ do + xfork $ do (pin, pout, perr, _) <- runInteractiveProcess cmd args Nothing Nothing hPutStr pin input hFlush pin @@ -107,7 +107,7 @@ it makes use of shell interpretation by relying on @$HOME@ and interpolation, whereas the safeSpawn example can be safe because Firefox doesn't need any arguments if it is just being started. -} safeSpawn :: MonadIO m => FilePath -> [String] -> m () -safeSpawn prog args = liftIO (try (forkProcess $ executeFile prog True args Nothing) >> return ()) +safeSpawn prog args = liftIO (try (xfork $ executeFile prog True args Nothing) >> return ()) -- | Like 'safeSpawn', but only takes a program (and no arguments for it). eg. -- @@ -135,7 +135,7 @@ spawnPipe x = io $ do setFdOption wr CloseOnExec True h <- fdToHandle wr hSetBuffering h LineBuffering - forkProcess $ do + xfork $ do createSession uninstallSignalHandlers dupTo rd stdInput |