2

xmonadパッケージに次のコードが表示されます。

-- | Ignore SIGPIPE to avoid termination when a pipe is full, and SIGCHLD to
-- avoid zombie processes, and clean up any extant zombie processes.
installSignalHandlers :: MonadIO m => m ()
installSignalHandlers = io $ do
    installHandler openEndedPipe Ignore Nothing
    installHandler sigCHLD Ignore Nothing
    (try :: IO a -> IO (Either SomeException a))
      $ fix $ \more -> do
        x <- getAnyProcessStatus False False
        when (isJust x) more
    return ()

このfix関数はData.Functionから来ているようです

しかし、ここでそれがどのように使用されているのか理解できません。また、誰かがこの修正機能をいつ使用するのでしょうか?

4

1 に答える 1