[commit: ghc] ghc-7.10: Rename `SysTools.readCreateProcess`. (4be3722)

git at git.haskell.org git at git.haskell.org
Tue Mar 10 18:22:59 UTC 2015


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

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/4be3722325d9c684ef3113b54adac17a46512cff/ghc

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

commit 4be3722325d9c684ef3113b54adac17a46512cff
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sun Mar 8 15:39:16 2015 +0100

    Rename `SysTools.readCreateProcess`.
    
    Functions `readCreateProcess` and `readCreateProcessWithExitCode` were added
    to `System.Process`, the former of which conflicts with
    `SysTools.readCreateProcess`.
    
    (cherry picked from commit 8b7534b39052c9cb44411bea0ca311a751564d6c)


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

4be3722325d9c684ef3113b54adac17a46512cff
 compiler/main/SysTools.hs | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index af80051..bef8d0c 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -467,13 +467,14 @@ askCc dflags args = do
       args2 = args0 ++ args1 ++ args
   mb_env <- getGccEnv args2
   runSomethingWith dflags "gcc" p args2 $ \real_args ->
-    readCreateProcess (proc p real_args){ env = mb_env }
+    readCreateProcessWithExitCode' (proc p real_args){ env = mb_env }
 
--- Version of System.Process.readProcessWithExitCode that takes an environment
-readCreateProcess
+-- Similar to System.Process.readCreateProcessWithExitCode, but stderr is
+-- inherited from the parent process, and output to stderr is not captured.
+readCreateProcessWithExitCode'
     :: CreateProcess
     -> IO (ExitCode, String)    -- ^ stdout
-readCreateProcess proc = do
+readCreateProcessWithExitCode' proc = do
     (_, Just outh, _, pid) <-
         createProcess proc{ std_out = CreatePipe }
 



More information about the ghc-commits mailing list