It is noted as POSIX getpgid(), but since it can only query the current process's process group, should it be POSIX getpgrp()?

Alternatively, if we do provide POSIX getpgid() as process-group, it should take a pid (can be optional, assuming the current process if omitted).