summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-05-14 06:45:47 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-05-14 06:45:47 +0200
commit90b0097c6c99758b232f518589d76257b7e64a73 (patch)
treeefee396d0356f61d0cf5bce7efe5f385f9d2bc74
parentb79ee80f159a3acab145beace2d764a01ea476cb (diff)
downloadmetatile-90b0097c6c99758b232f518589d76257b7e64a73.tar
metatile-90b0097c6c99758b232f518589d76257b7e64a73.zip
setsid() before exec. Intended to fix issue #7
darcs-hash:20070514044547-a5988-0e3c07a629fd1a28e11ee9ae1395086a5477dae2
-rw-r--r--XMonad.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/XMonad.hs b/XMonad.hs
index 71270e0..d996348 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -26,7 +26,7 @@ import StackSet (StackSet)
import Control.Monad.State
import Control.Monad.Reader
import System.IO
-import System.Posix.Process (executeFile, forkProcess, getProcessStatus)
+import System.Posix.Process (executeFile, forkProcess, getProcessStatus, createSession)
import System.Exit
import Graphics.X11.Xlib
import Data.Typeable
@@ -130,7 +130,7 @@ io = liftIO
spawn :: String -> X ()
spawn x = io $ do
pid <- forkProcess $ do
- forkProcess (executeFile "/bin/sh" False ["-c", x] Nothing)
+ forkProcess (createSession >> executeFile "/bin/sh" False ["-c", x] Nothing)
exitWith ExitSuccess
return ()
getProcessStatus True False pid