pid The process ID for which the process group ID is to be set. pgid The value to which the process group ID is set.