The getpgid function returns the process group ID of the process specified by pid. If pid is 0, the getpgid function returns the process group ID of the calling process. This function requires that long (32-bit) UID/GID support be enabled. See 32-Bit UID and GID Macro (Integrity servers, Alpha) for more information.