mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-08 16:11:51 -07:00
Use executeFile directly, rather than the shell, avoiding sh interepeting
This commit is contained in:
@@ -324,9 +324,13 @@ recompile = do
|
|||||||
let msg = unlines $
|
let msg = unlines $
|
||||||
["Error detected while loading xmonad configuration file: " ++ src]
|
["Error detected while loading xmonad configuration file: " ++ src]
|
||||||
++ lines ghcErr ++ ["","Please check the file for errors."]
|
++ lines ghcErr ++ ["","Please check the file for errors."]
|
||||||
|
-- usual double fork for async processes, and no zombies.
|
||||||
waitForProcess =<< runProcess "xmessage" [msg]
|
-- careful to use exec directly, avoiding shell
|
||||||
Nothing Nothing Nothing Nothing Nothing
|
-- interpreting chars in the command line args
|
||||||
|
pid <- forkProcess $ do
|
||||||
|
forkProcess $ createSession >> executeFile "xmessage" True [msg] Nothing
|
||||||
|
exitWith ExitSuccess
|
||||||
|
getProcessStatus True False pid
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
-- | Run a side effecting action with the current workspace. Like 'when' but
|
-- | Run a side effecting action with the current workspace. Like 'when' but
|
||||||
|
Reference in New Issue
Block a user