languageserver_detect: Detect whether a process relates to the R Language Server

Description Usage Arguments Value

View source: R/languageserver_detect.R

Description

Detect whether a process relates to the R Language Server

Usage

1
languageserver_detect(pid, os, langServerProcessPatt, checkParents = TRUE)

Arguments

pid

integer(1), id of the process to investigate, usually retrieved by Sys.getpid

os

character(1), name of the OS, usually retrieved as the "sysname" element of Sys.info, all lowercase.

langServerProcessPatt

character(1), pattern to recognize the process created by languageserver.

checkParents

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.

Value

logical(1), TRUE if the process with pid (or, optionally, any of its parents) is detected as the R Language Server process. Otherwise FALSE.


languageserversetup documentation built on April 14, 2020, 6:59 p.m.