[commit: packages/process] master: Listen to -Werror (fd79da2)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 21:19:17 UTC 2017


Repository : ssh://git@git.haskell.org/process

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/fd79da2d7c0f11b4ab70cbd232c2025af43430b5/process

>---------------------------------------------------------------

commit fd79da2d7c0f11b4ab70cbd232c2025af43430b5
Author: Charles Cooper <cooper.charles.m at gmail.com>
Date:   Sat Feb 4 15:43:29 2017 -0500

    Listen to -Werror


>---------------------------------------------------------------

fd79da2d7c0f11b4ab70cbd232c2025af43430b5
 test/main.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/main.hs b/test/main.hs
index f89f3ef..edb561a 100644
--- a/test/main.hs
+++ b/test/main.hs
@@ -71,12 +71,14 @@ main = do
     do -- multithreaded waitForProcess
       (_, _, _, p) <- createProcess (proc "sleep" ["0.1"])
       me1 <- newEmptyMVar
-      forkIO . void $ waitForProcess p >>= putMVar me1
+      _ <- forkIO . void $ waitForProcess p >>= putMVar me1
       -- check for race / deadlock between waitForProcess and getProcessExitCode
       e3 <- getProcessExitCode p
       e2 <- waitForProcess p
       e1 <- readMVar me1
-      unless (isNothing e3 && e1 == ExitSuccess && e2 == ExitSuccess)
+      unless (isNothing e3)
+            $ error $ "unexpected exit " ++ show e3
+      unless (e1 == ExitSuccess && e2 == ExitSuccess)
             $ error "sleep exited with non-zero exit code!"
 
     putStrLn "Tests passed successfully"



More information about the ghc-commits mailing list