-
Notifications
You must be signed in to change notification settings - Fork 128
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
(Refactoring) Simplify RMD child process disposal #773
(Refactoring) Simplify RMD child process disposal #773
Conversation
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? |
It does receive a
but I'm monitoring all R processes and the process is not actually terminated. |
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
Last push appears to have fixed the termination issue on my end |
Thanks for the quick fix. It works on my end too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- have to pass env and not quote rPath for windows spawn
- 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
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