[Xmonad] darcs patch: zombie_children
dons at galois.com
Wed Oct 24 19:16:06 EDT 2007
> On 10/24/07, Don Stewart <dons at galois.com> wrote:
> > Also, I'd like to know what impact, if any, waiting before every
> > X event has.
> I haven't noticed any impact on my Linux box. I assume that the
> wait() system call is implemented efficiently.
> Though now that I think about it, it should be better to just set
> SIGCHLD to SIG_IGN. Perhaps that would work on BSD too? I'll send
> another patch ...
Strangely, getGroupProcessStatus is implemented as:
getGroupProcessStatus :: Bool
-> IO (Maybe (ProcessID, ProcessStatus))
getGroupProcessStatus block stopped pgid =
alloca $ \wstatp -> do
pid <- throwErrnoIfMinus1Retry "getGroupProcessStatus"
(c_waitpid (-pgid) wstatp (waitOptions block stopped))
case pid of
0 -> return Nothing
_ -> do ps <- decipherWaitStatus wstatp
return (Just (pid, ps))
so we get Just/Nothing distinction, *and* a possible exception that
needs to be handles. How un-Haskelly.
More information about the Xmonad