From b3ed4613e77c72ae0d1f032e24d630bda85aec57 Mon Sep 17 00:00:00 2001 From: ncaq Date: Mon, 29 Jun 2020 17:07:23 +0900 Subject: [PATCH] fixed: yesod-bin: when C-c, kill yesod-bin and children process * deleted: `setDelegateCtlc True` * added: `setCreateGroup True` When you use a group, the child process will be terminated when the parent process is terminated. --- yesod-bin/Devel.hs | 3 ++- yesod-bin/README.md | 1 + yesod-bin/yesod-bin.cabal | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index 92bc682e..901616f8 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -345,7 +345,8 @@ devel opts passThroughArgs = do myPath <- getExecutablePath let procConfig = setStdout createSource $ setStderr createSource - $ setDelegateCtlc True $ proc "stack" $ + $ setCreateGroup True -- because need when yesod-bin killed and kill child ghc + $ proc "stack" $ [ "build" , "--fast" , "--file-watch" diff --git a/yesod-bin/README.md b/yesod-bin/README.md index cf05eea1..0c09c647 100644 --- a/yesod-bin/README.md +++ b/yesod-bin/README.md @@ -83,6 +83,7 @@ Now some weird notes: `yesod devel` also writes to a file `yesod-devel/devel-terminate`. Your devel script should respect this file and shutdown whenever it exists. + (It may be fixed in 1.6.0.5.) * If your .cabal file defines them, `yesod devel` will tell Stack to build with the flags `dev` and `library-only`. You can use this to speed up compile times (biggest win: skip building executables, thus diff --git a/yesod-bin/yesod-bin.cabal b/yesod-bin/yesod-bin.cabal index 49deb0ff..5c7125d5 100644 --- a/yesod-bin/yesod-bin.cabal +++ b/yesod-bin/yesod-bin.cabal @@ -1,5 +1,5 @@ name: yesod-bin -version: 1.6.0.4 +version: 1.6.0.5 license: MIT license-file: LICENSE author: Michael Snoyman