[CS2] CLI: Propagate SIGINT and SIGTERM signals when node is forked#4625
Merged
GeoffreyBooth merged 2 commits intojashkenas:2from Aug 3, 2017
Merged
[CS2] CLI: Propagate SIGINT and SIGTERM signals when node is forked#4625GeoffreyBooth merged 2 commits intojashkenas:2from
GeoffreyBooth merged 2 commits intojashkenas:2from
Conversation
Collaborator
|
Please retarget this against |
src/command.coffee
Outdated
| cwd: process.cwd() | ||
| env: process.env | ||
| stdio: [0, 1, 2] | ||
| ['SIGINT', 'SIGTERM'].forEach (signal) -> |
Collaborator
There was a problem hiding this comment.
Our preferred style is to use for…in:
for signal in ['SIGINT', 'SIGTERM']This compiles into a traditional for loop, without a new function or scope.
Contributor
Author
There was a problem hiding this comment.
I thought so looking at the surrounding code but in this case the new scope is necessary for the code to work properly.
Anyway I retargeted against 2 and used for...in with do for the scope.
76b1132 to
967c860
Compare
Collaborator
GeoffreyBooth
pushed a commit
to GeoffreyBooth/coffeescript
that referenced
this pull request
Aug 3, 2017
…ashkenas#4625) * Propagate SIGINT and SIGTERM signals when node is forked * Use for loop for consistency
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.
When running commands like
coffee --nodejs --max_old_space_size=128 index.coffeethe coffee process doesn't forward signals to node process, which was already discussed in #4185.Problem is that tools that use flow SIGTERM, delay, SIGKILL leave zombie processes.
This fixes #4185.