Learn R Programming

installr (version 0.22.0)

get_pid: Find the pid of a process by name

Description

Returns a vector with the process ID (pid) for all processes with a particular name.

Usage

get_pid(process, exact = FALSE, ...)

Arguments

process

a character vector of process names.

exact

logical (FALSE). should we get exact match to process name, or can we use just partial matching.

...

not used.

Value

an integer vector with the process ID (pid) of the processes.

References

tasklist details from microsoft homepage: http://technet.microsoft.com/en-us/library/bb491010.aspx

See Also

get_tasklist, get_Rscript_PID, get_pid, kill_pid, kill_all_Rscript_s, pskill

Examples

Run this code
# NOT RUN {
get_pid("rsession") # finds it
get_pid("rsession", exact = TRUE) # doesn't find it
get_pid("rsession.exe", exact = TRUE) # finds it
get_pid(c("wininit", "winlogon"), exact = TRUE) # doesn't find it
get_pid(c("wininit", "winlogon")) # finds it
# }

Run the code above in your browser using DataLab