-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Do not unref debug handle to avoid debug process stuck #2778
Conversation
Before we go into details, have you checked that it passes |
Thanks. I've noticed this patch would cause some tests failed. I will try to fix that. |
Change itself LGTM but the commit log needs to confirm to the guidelines from CONTRIBUTING.md. |
The debug process running "node debug a.js" will be stuck when the script ends. This is because the debug handler has been unrefed. We shouldn't unref the debug handler to avoid this problem.
21af0a4
to
66029bf
Compare
@bnoordhuis Thanks for reminding the commit log format. |
ping @bnoordhuis I've updated the commit log. Any other comments? |
The debug process running "node debug a.js" will be stuck when the script ends. This is because the debug handler has been unrefed. We shouldn't unref the debug handler to avoid this problem. PR-URL: #2778 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Landed in ff877e9, thanks. |
The debug process running "node debug a.js" will be stuck when the script ends. This is because the debug handler has been unrefed. We shouldn't unref the debug handler to avoid this problem. PR-URL: #2778 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Landed in v4.x-staging in dee9c74 |
Just a heads up but this PR introduced a regression and I'm moving to revert it, please see #3585. |
@bnoordhuis ... ugh... ok |
For a simple javascript file:
Run
node debug a.js
to launch debug process. Press firstc
and the program outputs> debug
. After that, pressc
again the process just gets stuck and has no response so we have to kill it.This is because debug handle has been unrefed. Once the program is finished, the event loop will be exited and the debug process will be stuck when debug sends commend again. We shouldn't unref the debug handle because even the script is finished, we can still send more debug command such as
restart
.Fixes #1788.