R/process.R

Defines functions renv_process_kill renv_process_exists

# NOTE: We use 'psnice()' here as R also supports using that
# for process detection on Windows; on all platforms R returns
# NA if you request information about a non-existent process
renv_process_exists <- function(pid) {
  !is.na(psnice(pid))
}

renv_process_kill <- function(pid, signal = 15L) {
  pskill(pid, signal)
}
rstudio/renv documentation built on July 8, 2024, 5:48 a.m.