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:
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.
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.
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?
I upgraded RStudio from 2022.02.3,492 to 2022.07.1,554 yesterday and found that the
hugo server
launched byblogdown::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 withoptions(blogdown.use.processx = FALSE)
(i.e., the background process is launched viasystem2(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:
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?