From: jneira Date: Thu, 17 Sep 2020 20:47:06 +0000 (+0200) Subject: Remove waitForProcess in finalizer for windows X-Git-Tag: 0.11.0.6~1^2 X-Git-Url: https://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=753acba85dddb7e8a6375358a1ab2d14fe8d29f6 Remove waitForProcess in finalizer for windows It was causing hangs running test suites in Windows --- diff --git a/src/Language/Haskell/LSP/Test/Session.hs b/src/Language/Haskell/LSP/Test/Session.hs index 4b93e71..9e4aa81 100644 --- a/src/Language/Haskell/LSP/Test/Session.hs +++ b/src/Language/Haskell/LSP/Test/Session.hs @@ -71,7 +71,10 @@ import Language.Haskell.LSP.Test.Exceptions import System.Console.ANSI import System.Directory import System.IO -import System.Process (waitForProcess, ProcessHandle()) +import System.Process (ProcessHandle()) +#ifndef mingw32_HOST_OS +import System.Process (waitForProcess) +#endif import System.Timeout -- | A session representing one instance of launching and connecting to a server. @@ -271,7 +274,10 @@ runSessionWithHandles serverIn serverOut serverProc serverHandler config caps ro -- handles etc via cleanupProcess killThread tid -- Give the server some time to exit cleanly + -- It makes the server hangs in windows so we have to avoid it +#ifndef mingw32_HOST_OS timeout msgTimeoutMs (waitForProcess serverProc) +#endif cleanupProcess server (result, _) <- bracket serverListenerLauncher