From fd327b484fe78402c83bc2e61bad885119aa1790 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Thu, 22 Jan 2009 01:04:23 +0100 Subject: Create a new session for forked processes Ignore-this: f5d9cf254a0b07ddbf204457b7783880 darcs-hash:20090122000423-25a6b-953d34966aee5389a1e13368b5ab2a9d5dd4f7d1 --- XMonad/Core.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'XMonad') 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 -- cgit v1.2.3