-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve child process management #663
Merged
Merged
Conversation
This file contains 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
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/vercel/turbo-site/4KHFLDKEMT4ekNKoA644Ae1mRfww |
Makes sense so far to me |
gsoltis
force-pushed
the
gsoltis/handle_signals
branch
from
February 3, 2022 04:29
3217dd6
to
6a3433c
Compare
gsoltis
force-pushed
the
gsoltis/handle_signals
branch
from
February 3, 2022 18:41
3925f92
to
1a82f1b
Compare
…xits unexpectedly
gsoltis
force-pushed
the
gsoltis/handle_signals
branch
from
February 3, 2022 19:25
1a82f1b
to
f7061e6
Compare
jaredpalmer
requested changes
Feb 3, 2022
In which Turbo version this PR will be available ? :) |
Canary channel
On Thu, Feb 3, 2022 at 4:43 PM Sylvain Corsini ***@***.***> wrote:
In which Turbo version this PR will be available ? :)
—
Reply to this email directly, view it on GitHub
<#663 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA67IG3XIDC7XGX5TJRPU43UZLZGPANCNFSM5NKQF65A>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
--
*Jared Palmer ***@***.*** <https://twitter.com/jaredpalmer>)
▲ Engineer at Vercel <https://vercel.com/>
|
Closed
1 task
1 task
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.
SIGINT
to our child processes--continue
is not set, sendSIGINT
to all of our child processesPractically, this means that hitting
Ctrl+C
on the terminal will shut down all of the child processes viaSIGINT
. Additionally, if one task fails, other tasks will not be left lingering, and will be sent aSIGINT
.Some considerations: if
turbo
is invoked viayarn
ornpm
, it will not be the root of the process tree, and as suchCtrl+C
will hand control back to the user beforeturbo
has exited, meaning that the user will likely getstdout
/stderr
after the prompt has reappeared. I don't think there's anything we can do about this.Running
turbo
directly should avoid this, with the exception of a child process failing to exit in the 10-second grace period.Also note that as a result of this change, each child process is given its own process group. This is done so that we can send
SIGINT
to an entire child process tree without also sending it to ourselves. By default, all child processes would be in the same process tree asturbo
.Remaining work:
process.Manager
and the signal handling codehashicorp/consul-template
Fixes #444
Fixes #470