From f972102ef3a4eb32bbfa2f03b04a4b8ef8780091 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 23 Feb 2022 00:03:40 +0100 Subject: [PATCH] Default delegate_ctlc to True --- Cabal/src/Distribution/Compat/Process.hs | 4 ++-- Cabal/src/Distribution/Simple/Utils.hs | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Cabal/src/Distribution/Compat/Process.hs b/Cabal/src/Distribution/Compat/Process.hs index 1daa0d5e3ea..1dde07d4351 100644 --- a/Cabal/src/Distribution/Compat/Process.hs +++ b/Cabal/src/Distribution/Compat/Process.hs @@ -64,7 +64,7 @@ enableProcessJobs cp = cp -- | 'System.Process.proc' with process jobs enabled when appropriate, -- and defaulting 'delegate_ctlc' to 'True'. proc :: FilePath -> [String] -> CreateProcess -proc path args = enableProcessJobs (Process.proc path args) +proc path args = enableProcessJobs (Process.proc path args) { Process.delegate_ctlc = True } -- | 'System.Process.createProcess' with process jobs enabled when appropriate. -- See 'enableProcessJobs'. @@ -76,7 +76,7 @@ createProcess = Process.createProcess . enableProcessJobs -- See 'enableProcessJobs'. rawSystem :: FilePath -> [String] -> IO ExitCode rawSystem path args = do - (_,_,_,p) <- Process.createProcess (proc path args) { Process.delegate_ctlc = True } + (_,_,_,p) <- Process.createProcess (proc path args) Process.waitForProcess p -- | 'System.Process.runInteractiveProcess' with process jobs enabled when diff --git a/Cabal/src/Distribution/Simple/Utils.hs b/Cabal/src/Distribution/Simple/Utils.hs index dd669db5e9d..4dec9817cac 100644 --- a/Cabal/src/Distribution/Simple/Utils.hs +++ b/Cabal/src/Distribution/Simple/Utils.hs @@ -777,8 +777,7 @@ rawSystemExit verbosity path args = withFrozenCallStack $ -- rawSystemExitCode :: Verbosity -> FilePath -> [String] -> IO ExitCode rawSystemExitCode verbosity path args = withFrozenCallStack $ - rawSystemProc verbosity $ - (proc path args) { Process.delegate_ctlc = True } + rawSystemProc verbosity $ proc path args -- | Execute the given command with the given arguments, returning -- the command's exit code. @@ -834,7 +833,6 @@ rawSystemExitWithEnv :: Verbosity rawSystemExitWithEnv verbosity path args env = withFrozenCallStack $ maybeExit $ rawSystemProc verbosity $ (proc path args) { Process.env = Just env - , Process.delegate_ctlc = True } -- | Execute the given command with the given arguments, returning @@ -884,7 +882,6 @@ rawSystemIOWithEnvAndAction verbosity path args mcwd menv action inp out err = w , Process.std_in = mbToStd inp , Process.std_out = mbToStd out , Process.std_err = mbToStd err - , Process.delegate_ctlc = True } rawSystemProcAction verbosity cp (\_ _ _ -> action) where @@ -909,7 +906,6 @@ createProcessWithEnv verbosity path args mcwd menv inp out err = withFrozenCallS , Process.std_in = inp , Process.std_out = out , Process.std_err = err - , Process.delegate_ctlc = True } logCommand verbosity cp Process.createProcess cp @@ -950,6 +946,7 @@ rawSystemStdInOut verbosity path args mcwd menv input _ = withFrozenCallStack $ , Process.std_in = Process.CreatePipe , Process.std_out = Process.CreatePipe , Process.std_err = Process.CreatePipe + , Process.delegate_ctlc = False -- !!! } (exitcode, (mberr1, mberr2)) <- rawSystemProcAction verbosity cp $ \mb_in mb_out mb_err -> do