diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-05-31 16:59:03 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-04 04:38:36 -0400 |
commit | ad44b50484f27beceab8213a061aa60c7a03f7ca (patch) | |
tree | c880e89e04a44a8d35762bde6d28841de50164b4 | |
parent | cab684f0857c71c40996201d6fb3ba93eb38a701 (diff) | |
download | haskell-ad44b50484f27beceab8213a061aa60c7a03f7ca.tar.gz |
compiler: Disable use of process jobs with process < 1.6.9
Due to #17926.
-rw-r--r-- | compiler/GHC/SysTools/Process.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/GHC/SysTools/Process.hs b/compiler/GHC/SysTools/Process.hs index a7649ed534..4f11a29ea1 100644 --- a/compiler/GHC/SysTools/Process.hs +++ b/compiler/GHC/SysTools/Process.hs @@ -33,13 +33,17 @@ import System.Process import GHC.SysTools.FileCleanup -- | Enable process jobs support on Windows if it can be expected to work (e.g. --- @process >= 1.6.8.0@). +-- @process >= 1.6.9.0@). enableProcessJobs :: CreateProcess -> CreateProcess #if defined(MIN_VERSION_process) +#if MIN_VERSION_process(1,6,9) enableProcessJobs opts = opts { use_process_jobs = True } #else enableProcessJobs opts = opts #endif +#else +enableProcessJobs opts = opts +#endif -- Similar to System.Process.readCreateProcessWithExitCode, but stderr is -- inherited from the parent process, and output to stderr is not captured. @@ -48,7 +52,7 @@ readCreateProcessWithExitCode' -> IO (ExitCode, String) -- ^ stdout readCreateProcessWithExitCode' proc = do (_, Just outh, _, pid) <- - createProcess proc{ std_out = CreatePipe } + createProcess $ enableProcessJobs $ proc{ std_out = CreatePipe } -- fork off a thread to start consuming the output output <- hGetContents outh @@ -77,7 +81,7 @@ readProcessEnvWithExitCode -> IO (ExitCode, String, String) -- ^ (exit_code, stdout, stderr) readProcessEnvWithExitCode prog args env_update = do current_env <- getEnvironment - readCreateProcessWithExitCode (enableProcessJobs $ proc prog args) { + readCreateProcessWithExitCode (proc prog args) { env = Just (replaceVar env_update current_env) } "" -- Don't let gcc localize version info string, #8825 |