getpgidsomepid
Getpgidsomepid is not a standard, widely published function name. It is a descriptive term for the operation of obtaining the process group ID (PGID) of a process identified by a given process ID (PID). In standard POSIX interfaces, this operation is performed by the function getpgid(pid_t pid).
Prototype and behavior: The standard form is pid_t getpgid(pid_t pid); If pid is 0, the call returns
Usage and rationale: Retrieving a process’s PGID is useful for signaling a whole process group, coordinating
} else {
printf("PGID of %d is %d\n", pid, pgid);
}
Platform considerations: getpgid is available on most Unix-like systems, including Linux and BSD variants, as well
Related terms: getpgid, setpgid, kill, signal handling. See also process groups and job control facilities in