Skip to content
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

Using RStudio addins will kill the hugo server in the background #721

Open
yihui opened this issue Jul 27, 2022 · 0 comments
Open

Using RStudio addins will kill the hugo server in the background #721

yihui opened this issue Jul 27, 2022 · 0 comments

Comments

@yihui
Copy link
Member

yihui commented Jul 27, 2022

I upgraded RStudio from 2022.02.3,492 to 2022.07.1,554 yesterday and found that the hugo server launched by blogdown::serve_site() would almost always be killed after I close any RStudio addin (e.g., the "New Post" addin of blogdown). That is, as soon as I close the addin, the website preview is dead. This only happens with options(blogdown.use.processx = FALSE) (i.e., the background process is launched via system2(wait = FALSE)).

I spent a couple of hours on trying to figure out why this happens but didn't find out the culprit. I thought it was because of the new RStudio version, but even if I go back to the older version, the same thing occurs. Other findings:

  1. It's not limited to RStudio addins, but any Shiny apps. If I run and stop any Shiny app, the hugo server is stopped, too.
  2. I tested several Hugo versions and only 0.25/0.26 survived. I also tested other background processes (e.g., a shell script with an infinite loop), and they wouldn't be killed.
  3. options(blogdown.use.processx = TRUE) works fine (the process won't be killed).

I'm not sure if this is specific to macOS. @cderv Are you able to reproduce it on Windows/Linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant