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 | 13391aeabcaf0c0c32bc78804a54d4debb58beaf (patch) | |
tree | 21502be6ae4a8092f5393484d1093f9636bd75b5 /XMonad/Main.hsc | |
parent | 92c5b060bd04280d907c692ca10391ae8bc8b0f7 (diff) | |
download | xmonad-13391aeabcaf0c0c32bc78804a54d4debb58beaf.tar.gz xmonad-13391aeabcaf0c0c32bc78804a54d4debb58beaf.tar.xz xmonad-13391aeabcaf0c0c32bc78804a54d4debb58beaf.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.gz
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 "" |