Get Session Process ID

DESCRIPTION:

Get the process ID and parent process ID of the S-PLUS session. Two S-PLUS sessions running simultaneously on the same machine will have unique IDs.

USAGE:

process.id()
Sys.getpid()

VALUE:

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.

DETAILS:

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.

SEE ALSO:

Function returns the process ID and the parent process ID along with other information about the current S-PLUS session and version.

EXAMPLES:

process.id()[[1]] == Sys.getpid()
# returns TRUE