HenrikBengtsson / startup

:wrench: R package: startup - Friendly R Startup Configuration
https://henrikbengtsson.github.io/startup/
163 stars 5 forks source link

restart(): Investigate issue on MS Windows where original R session does not terminate #120

Open HenrikBengtsson opened 2 years ago

HenrikBengtsson commented 2 years ago

From https://stackoverflow.com/a/45353499/1072091 (2017-07-27T14:18):

Most of the answers submitted here involve using shell or system which doesn't quite work because while they open a new R console and do instruct the original console to close, the new console is a process running in the application context of the old console. That means the original console cannot close until the new console closes. Some of the users above such as hedgedandlevered reported that closing the original console forces the new console to close. When I try, the new console does open, but the old console remains open in a frozen state until the new console is closed.

The basic problem is calling shell or system does not change the application context from the original console to the new one, and therefore the original process cannot terminate until the new console closes.