feat: Kill child processes when task shell receives ctrl-c #126
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.
When running docker compose from "deno task" you get bad CTRL-C handling compared to "npm run". This problem can be reproduced by running "npm run docker-compose" and "deno task docker-compose" in this minimal testcase repo:
https://github.com/mo/deno-tasks-signal-issue-repro
There is some more info in this issue:
#33
When this PR is applied, "deno task docker-compose" works similar to "npm run", however the code is the PR needs some cleanup.
I tried to clean it up by not spawning a tokio task however that version doesn't solve the main docker compose use case and unfortunately I don't understand why that is. This version also prints some debug info with a new empty lines just to make sure the debug print outs doesn't get overwritten by the docker compose "progress" printouts:
mo@7514eba
@dsherret already provided some feedback on needed cleanup of this PR in an earlier PR which was incorrectly pushed with the PR-commit directly on "main".. so the current PR just aims to re-create the PR so that maintainer edits are possible. The old PR was:
#125