From cf501485b1325c91f9f6735e8d59248755d2a53c Mon Sep 17 00:00:00 2001 From: uu1101 Date: Fri, 14 Jun 2013 00:32:45 +0200 Subject: Deepseq stderr before closing the handle Otherwise laziness allows for the handle to be closed withouth receiving the input. This caused that no error messages were printed when `unixFilter`s failed. --- src/Hakyll/Core/UnixFilter.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Hakyll/Core/UnixFilter.hs b/src/Hakyll/Core/UnixFilter.hs index e6d4610..3e2d80c 100644 --- a/src/Hakyll/Core/UnixFilter.hs +++ b/src/Hakyll/Core/UnixFilter.hs @@ -130,6 +130,7 @@ unixFilterIO writer reader programName args input = do -- Read from stderr _ <- forkIO $ do err <- hGetContents errh + _ <- deepseq err (return err) hClose errh writeIORef errRef err putMVar lock () -- cgit v1.2.3