diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-03-13 16:33:10 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-03-13 16:33:10 +0100 |
commit | 5341c579b074e3e0ead3f6be224f1dd9c354139e (patch) | |
tree | d417422f540a9390e2864584ae174c05abf87930 /XMonad.hs | |
parent | 670bef2d339a1e4c4e204e739663f5ae4014ca1f (diff) | |
download | metatile-5341c579b074e3e0ead3f6be224f1dd9c354139e.tar metatile-5341c579b074e3e0ead3f6be224f1dd9c354139e.zip |
Fix forking issues, add unix dependency.
darcs-hash:20070313153310-a5988-47512502a33b3b003a6a3106ad730e61cbd0d548
Diffstat (limited to 'XMonad.hs')
-rw-r--r-- | XMonad.hs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -24,7 +24,7 @@ import StackSet (StackSet) import Control.Monad.State import System.IO -import System.Process (runCommand) +import System.Posix.Process (newSession, executeFile) import Graphics.X11.Xlib import Control.Exception @@ -73,8 +73,7 @@ io = liftIO -- | spawn. Launch an external application spawn :: String -> X () -spawn x = do v <- io $ handle (return . Just) (runCommand x >> return Nothing) - whenJust v $ \e -> trace $ "xmonad:spawn: unable to fork "++show x++": "++show e +spawn x = io $ forkProcess (do newSession; executeFile "/bin/sh" False ["-c", x] Nothing) -- | Run a side effecting action with the current workspace. Like 'when' but whenJust :: Maybe a -> (a -> X ()) -> X () |