process.id() Sys.getpid()
process.id
returns a list of two named elements:
"pid", the process ID, and "ppid", the parent process ID.
Sys.getid
returns an integer value, the
process ID.
The process ID is the same will be the same as the PID returned by the
UNIX
'ps'
command, and the parent process ID
corresponds to the PPID returned by
'ps -l'
.
The function
Sys.getpid
was added for compatibility
with R.
process.id()[[1]] == Sys.getpid() # returns TRUE