getpid: Obtain the process id for the current process.

Description Usage Details Value Author(s) References See Also Examples

Description

Obtain the process number for the current process.

Usage

1

Details

This function is a simple wrapper around the Unix "getpid" function call.

Value

Integer process id.

Author(s)

Gregory R. Warnes greg@warnes.net

References

Unix "getpid" man page

See Also

fork, exit, wait, kill, killall

Examples

1
2
3
4
5
6
7
getpid()

## Not run: 
for(i in 1:10)
  fork( function() { cat("PID:", getpid(), "\n"); exit()} )

## End(Not run)

warnes/fork documentation built on May 4, 2019, 12:59 a.m.