Terminate child processes on sigINT/sigTERM#7757
Closed
hasufell wants to merge 1 commit intohaskell:masterfrom
Closed
Terminate child processes on sigINT/sigTERM#7757hasufell wants to merge 1 commit intohaskell:masterfrom
hasufell wants to merge 1 commit intohaskell:masterfrom
Conversation
7b6f469 to
5b1d79a
Compare
Member
Author
|
Note that we don't really re-throw the signal to the child, but rather run
|
Member
Author
|
So I tracked down the callstack for the downloaders that invoke curl etc... and it seems they also invoke |
Member
Author
|
Another possibility is to do it like -- | Execute a process within the configured environment.
--
-- Execution will not return, because either:
--
-- 1) On non-windows, execution is taken over by execv of the
-- sub-process. This allows signals to be propagated (#527)
--
-- 2) On windows, an 'ExitCode' exception will be thrown.
--
-- @since 0.0.3.0
exec :: (HasProcessContext env, HasLogFunc env) => String -> [String] -> RIO env b
#ifdef WINDOWS
exec = execSpawn
#else
exec cmd0 args = do
wd <- view workingDirL
envStringsL <- view envVarsStringsL
cmd <- preProcess cmd0
withProcessTimeLog wd cmd args $ liftIO $ do
for_ wd setCurrentDirectory
executeFile cmd True args $ Just envStringsL
#endifBut this seems to me it would only work nicely on unix. |
Collaborator
|
Very much in favour of doing something here! I think Some vague thoughts:
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For more information, check out ndmitchell/shake#169
Questions that may need to be discussed:
exec(at least forcabal run/exec), but that doesn't seem to be available on windows.