getpid(2) getpid(2)NAME getpid, getpgrp, getppid - get process, process group, or parent process IDs SYNOPSIS #include <sys/types.h> pid_t getpid() pid_t getpgrp() pid_t getppid() DESCRIPTION getpid returns the process ID of the calling process. Each active process in the system is uniquely identified by a po- sitive integer. The range of this integer is from 1 to the system-imposed limit, or PID_MAX. getpgrp returns the process group ID of the calling process. Each active process is a member of a process group that is identified by a positive integer. This grouping permits the signaling of related processes. getppid returns the parent process ID of the calling pro- cess. The parent process ID is the process ID of its crea- tor. RETURN VALUE getpid Returns the process ID of the calling process. getpgrp Returns the process group ID of the calling process. getppid Returns the parent process ID of the calling pro- cess. These system calls are useful for generating uniquely named temporary files. SEE ALSO exec(2), fork(2), gethostid(2N), intro(2), setpgrp(2), sig- nal(3). April, 1990 1