diff options
author | Spencer Janssen <spencerjanssen@gmail.com> | 2009-01-16 21:47:42 +0100 |
---|---|---|
committer | Spencer Janssen <spencerjanssen@gmail.com> | 2009-01-16 21:47:42 +0100 |
commit | ba6f59efaa7cf6e315daefe0cb9f49f1b7c88a38 (patch) | |
tree | 21502be6ae4a8092f5393484d1093f9636bd75b5 /XMonad/Main.hsc | |
parent | 98a65dd810b645c8d022957cc2168a9a9386b09a (diff) | |
download | metatile-ba6f59efaa7cf6e315daefe0cb9f49f1b7c88a38.tar metatile-ba6f59efaa7cf6e315daefe0cb9f49f1b7c88a38.zip |
Remove doubleFork, handle SIGCHLD
Ignore-this: f9b1a65b4f0622922f80ad2ab6c5a52f
This is a rather big change. Rather than make spawned processes become
children of init, we handle them in xmonad. As a side effect of this change,
we never need to use waitForProcess in any contrib module -- in fact, doing so
will raise an exception. The main benefit to handling SIGCHLD is that xmonad
can now be started with 'exec', and will correctly clean up after inherited
child processes.
darcs-hash:20090116204742-25a6b-9594fc6cdfcd5552894b64b4b6137f8a7cf2021d
Diffstat (limited to 'XMonad/Main.hsc')
-rw-r--r-- | XMonad/Main.hsc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc index 531939e..99bc77f 100644 --- a/XMonad/Main.hsc +++ b/XMonad/Main.hsc @@ -27,7 +27,6 @@ import Foreign.C import Foreign.Ptr import System.Environment (getArgs) -import System.Posix.Signals import Graphics.X11.Xlib hiding (refreshKeyboardMapping) import Graphics.X11.Xlib.Extras @@ -57,8 +56,8 @@ xmonad :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO () xmonad initxmc = do -- setup locale information from environment withCString "" $ c_setlocale (#const LC_ALL) - -- ignore SIGPIPE - installHandler openEndedPipe Ignore Nothing + -- ignore SIGPIPE and SIGCHLD + installSignalHandlers -- First, wrap the layout in an existential, to keep things pretty: let xmc = initxmc { layoutHook = Layout $ layoutHook initxmc } dpy <- openDisplay "" |