diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-09-13 12:02:14 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-17 09:40:44 -0400 |
commit | bfddee13d10b183452508fa00116b6449ffeb757 (patch) | |
tree | b33adba6ac76325ab198cbb880309610b24f9724 /compiler | |
parent | aa6caab0c0895c896621b1f62cf4b0f1601f43bf (diff) | |
download | haskell-bfddee13d10b183452508fa00116b6449ffeb757.tar.gz |
Stop leaking <defunct> llc processes
We needed to wait for the process to exit in the clean-up script as
otherwise the `llc` process will not be killed until compilation
finishes. This leads to running out of process spaces on some OSs.
Thanks to Edsko de Vries for suggesting this fix.
Fixes #20305
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/SysTools/Tasks.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/SysTools/Tasks.hs b/compiler/GHC/SysTools/Tasks.hs index 7c1ea332cf..6bf7e9ba43 100644 --- a/compiler/GHC/SysTools/Tasks.hs +++ b/compiler/GHC/SysTools/Tasks.hs @@ -213,7 +213,7 @@ figureLlvmVersion logger dflags = traceToolCommand logger "llc" $ do -- options are specified when '-version' is used. args' = args ++ ["-version"] catchIO (do - (pin, pout, perr, _) <- runInteractiveProcess pgm args' + (pin, pout, perr, p) <- runInteractiveProcess pgm args' Nothing Nothing {- > llc -version LLVM (http://llvm.org/): @@ -227,6 +227,7 @@ figureLlvmVersion logger dflags = traceToolCommand logger "llc" $ do hClose pin hClose pout hClose perr + _ <- waitForProcess p return mb_ver ) (\err -> do |