getpgrp(PID)

getpgrp PID

Returns the current process group for the specified
PID, 0 for the current process. Not supported on
MS-DOS.