(Refactoring) Simplify RMD child process disposal#773
Merged
ElianHugh merged 3 commits intoREditorSupport:masterfrom Sep 6, 2021
Merged
(Refactoring) Simplify RMD child process disposal#773ElianHugh merged 3 commits intoREditorSupport:masterfrom
ElianHugh merged 3 commits intoREditorSupport:masterfrom
Conversation
Member
|
I try the following Rmd The kniting will take 100s to finish. When I click "Cancel", the progress window is closed but the R process is still running until it is finished. Shouldn't the process be killed once it is cancelled? |
Collaborator
Author
Member
|
It does receive a but I'm monitoring all R processes and the process is not actually terminated. |
Collaborator
Author
|
I believe this is caused by the use of exec rather than spawn, as the shell appears to not close until completion |
- Exec uses a shell which cannot be terminated on demand via SIGINT/SIGKILL - terminating spawn appears to function appropriately
Collaborator
Author
|
Last push appears to have fixed the termination issue on my end |
Member
|
Thanks for the quick fix. It works on my end too. |
- have to pass env and not quote rPath for windows spawn
ElianHugh
added a commit
to ElianHugh/vscode-R
that referenced
this pull request
May 12, 2022
- Contributes a helper function for creating disposables from objects - Simplifies disposal of child processes - Do not print lines to output when the process has already been terminated - use childProcess.spawn instead of childProcess.exec, to allow for faster process termination
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.

Minor refactor to the R Markdown preview/knit processes, cleaning up the disposal of child processes.
Changes:
Both knitting and previewing should function as before