Get main process ID.Source:
Get the process ID (PID) of the most recent main R process to orchestrate the targets of the current project.
tar_pid(store = targets::tar_config_get("store"))
Character of length 1, path to the
targetsdata store. Defaults to
tar_config_get("store"), which in turn defaults to
_targets/. When you set this argument, the value of
tar_config_get("store")is temporarily changed for the current function call. See
tar_config_set()for details about how to set the data store path persistently for a project.
Integer with the process ID (PID) of the most recent main R process to orchestrate the targets of the current project.
The main process is the R process invoked
tar_make() or similar. If
callr_function is not
this is an external process, and the
pid in the return value
will not agree with
Sys.getpid() in your current interactive session.
The process may or may not be alive. You may want to
check it with
before running another call to
for the same project.