summaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorSpencer Janssen <spencerjanssen@gmail.com>2009-01-22 01:04:23 +0100
committerSpencer Janssen <spencerjanssen@gmail.com>2009-01-22 01:04:23 +0100
commitfd327b484fe78402c83bc2e61bad885119aa1790 (patch)
treeeae855fae559c61e8b395caa10f721d2ea587dd0 /XMonad
parent31642b5d699553452e7847579b83a388649885d5 (diff)
downloadmetatile-fd327b484fe78402c83bc2e61bad885119aa1790.tar
metatile-fd327b484fe78402c83bc2e61bad885119aa1790.zip
Create a new session for forked processes
Ignore-this: f5d9cf254a0b07ddbf204457b7783880 darcs-hash:20090122000423-25a6b-953d34966aee5389a1e13368b5ab2a9d5dd4f7d1
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Core.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs
index 543d859..e0afcda 100644
--- a/XMonad/Core.hs
+++ b/XMonad/Core.hs
@@ -39,7 +39,7 @@ import Control.Monad.State
import Control.Monad.Reader
import System.IO
import System.Info
-import System.Posix.Process (executeFile, forkProcess, getAnyProcessStatus)
+import System.Posix.Process (executeFile, forkProcess, getAnyProcessStatus, createSession)
import System.Posix.Signals
import System.Posix.IO
import System.Posix.Types (ProcessID)
@@ -357,7 +357,8 @@ spawn x = spawnPID x >> return ()
-- | Like 'spawn', but returns the 'ProcessID' of the launched application
spawnPID :: MonadIO m => String -> m ProcessID
-spawnPID x = io . forkProcess . finally nullStdin $
+spawnPID x = io . forkProcess . finally nullStdin $ do
+ createSession
executeFile "/bin/sh" False ["-c", x] Nothing
where
nullStdin = do