Let language server subprocess be its own process group #77
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.
In situations where
multilspy
is launched from another process, a SIGINT or SIGTERM signal will be received by both the launching process as well as the process running the language server becauseasyncio.create_subprocess_shell
defaults tostart_new_session=False
. In such a situation,lsp_protocol_handler.server.shutdown
will be called but will hang since the underlying process is already terminated,lsp_protocol_handler.server
won't ever receive an answer back forshutdown
.This change makes it so that SIGINT and SIGTERM won't propagate to the language server process. We rely on the clean up code already in place to shut down the process as desired.
See python documentation for more details on
start_new_session