Permalink
Browse files

xmonad: uninstallSignalHandlers on run (testing)

  • Loading branch information...
dylex committed Apr 5, 2011
1 parent 507572e commit 69afdd98610a33728a1673807e0c8681f38036a3
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Ops.hs
View
@@ -22,6 +22,7 @@ import Data.IORef
import Data.Maybe
import System.IO
import System.IO.Unsafe
+import System.Posix.Process (executeFile, forkProcess, createSession)
import System.Process
import XMonad as X
import qualified XMonad.StackSet as W
@@ -60,7 +61,12 @@ runCreateProcess (Run p a) = proc p a
runCreateProcess (RunShell s) = shell s
run :: MonadIO m => Run -> m ()
-run r = io $ void $ createProcess $ runCreateProcess r -- throws?
+-- run r = io $ void $ createProcess $ runCreateProcess r -- throws?
+run (RunShell c) = run $ Run "/bin/sh" ["-c", c]
+run (Run p a) = io $ void $ forkProcess $ do
+ uninstallSignalHandlers
+ _ <- createSession
+ executeFile p (head p /= '/') a Nothing
runPipe :: Run -> IO Handle
runPipe r = do

0 comments on commit 69afdd9

Please sign in to comment.