R/process.R
raw| 1 | |
| 2 | # NOTE: We use 'psnice()' here as R also supports using that |
| 3 | # for process detection on Windows; on all platforms R returns |
| 4 | # NA if you request information about a non-existent process |
| 5 | renv_process_exists <- function(pid) { |
| 6 | !is.na(psnice(pid)) |
| 7 | } |
| 8 | |
| 9 | renv_process_kill <- function(pid, signal = 15L) { |
| 10 | pskill(pid, signal) |
| 11 | } |