Detect whether a process relates to the R Language Server
languageserver_detect(pid, os, langServerProcessPatt, checkParents = TRUE)
integer(1)
, id of the process to investigate,
usually retrieved by Sys.getpid
character(1)
, name of the OS, usually retrieved
as the "sysname"
element of Sys.info
, all lowercase.
character(1)
, pattern to
recognize the process created by languageserver
.
logical(1)
, if TRUE
, parent processes are also
checked in case when pid
is not the R Language Server process. This
is needed as the linting processes are created with callr as
sub-processes of the main Language Server process.
logical(1), TRUE
if the process with pid
(or, optionally,
any of its parents) is detected as the R Language Server process.
Otherwise FALSE
.