diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-05-14 06:45:47 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-05-14 06:45:47 +0200 |
commit | 90b0097c6c99758b232f518589d76257b7e64a73 (patch) | |
tree | efee396d0356f61d0cf5bce7efe5f385f9d2bc74 | |
parent | b79ee80f159a3acab145beace2d764a01ea476cb (diff) | |
download | metatile-90b0097c6c99758b232f518589d76257b7e64a73.tar metatile-90b0097c6c99758b232f518589d76257b7e64a73.zip |
setsid() before exec. Intended to fix issue #7
darcs-hash:20070514044547-a5988-0e3c07a629fd1a28e11ee9ae1395086a5477dae2
-rw-r--r-- | XMonad.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |