Repository navigation
Destroy the helper process in NodeJsManager.executeCommand - #497
Merged
Sheng Chen (jdneo) merged 1 commit intoOct 20, 2026
Merged
Sheng Chen (jdneo) merged 1 commit into
Sheng Chen (jdneo) merged 1 commit into
Conversation
Lars Vogel (vogella)
requested review from
Ethan Hou (ethanyhou),
Sheng Chen (jdneo) and
xinyi-gong
as code owners
October 16, 2026 20:50
executeCommand only closed the stdout reader of the process it started, so the processes used to locate Node.js through a login shell and to run node -v were never destroyed and their stderr pipe was never drained. The process is now started with stderr discarded and destroyed after the first output line has been read. Assisted-by: multiple AI agents and layers of automated tooling 🤖
Lars Vogel (vogella)
force-pushed
the
nodejs-command-process-cleanup
branch
from
October 16, 2026 20:59
669d67a to
e4550d4
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The localized cleanup preserves caller behavior and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Improves cleanup of helper processes used to locate and validate Node.js.
Changes:
- Discards stderr to prevent pipe-buffer blocking.
- Destroys the process in
finally, preserving first-line output handling.
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/NodeJsManager.java | Adds stderr redirection and helper-process cleanup. |
Review effort: Balanced
Sheng Chen (jdneo)
approved these changes
Oct 20, 2026
Sheng Chen (jdneo)
left a comment
Member
There was a problem hiding this comment.
Thank you for your contribution!
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.
NodeJsManager.executeCommand, used to locate Node.js through a login shell and to run node -v on the result, only closed the stdout reader of the process it started. The process itself was never destroyed and its stderr pipe was never drained, so each call left a process and its file handles behind, and a login shell writing a lot to stderr could block. The process is now started with stderr discarded and destroyed once the first output line, the only one the callers use, has been read.