GETPGRP(2) BSD Programmer's Manual GETPGRP(2) NNAAMMEE ggeettppggrrpp - get process group SSYYNNOOPPSSIISS ##iinncclluuddee <<uunniissttdd..hh>> _p_i_d___t ggeettppggrrpp(_v_o_i_d); DDEESSCCRRIIPPTTIIOONN The process group of the current process is returned by ggeettppggrrpp(). Process groups are used for distribution of signals, and by terminals to arbitrate requests for their input: processes that have the same process group as the terminal are foreground and may read, while others will block with a signal if they attempt to read. This call is thus used by programs such as csh(1) to create process groups in implementing job control. The ttccggeettppggrrpp() and ttccsseettppggrrpp() calls are used to get/set the process group of the control terminal. SSEEEE AALLSSOO setpgid(2), termios(4) HHIISSTTOORRYY The ggeettppggrrpp function call appeared in 4.0BSD. SSTTAANNDDAARRDDSS The ggeettppggrrpp() function conforms to IEEE Std 1003.1-1988 (``POSIX''). CCOOMMPPAATTAABBIILLIITTYY This version of ggeettppggrrpp() differs from past Berkeley versions by not tak- ing a _p_i_d___t _p_i_d argument. This incompatibility is required by IEEE Std1003.1-1988 (``POSIX''). From the IEEE Std1003.1-1988 (``POSIX'') Rationale: 4.3BSD provides a ggeettppggrrpp() function that returns the process group ID for a specified process. Although this function is used to support job control, all known job-control shells always specify the calling process with this function. Thus, the simpler System V ggeettppggrrpp() suffices, and the added complexity of the 4.3BSD ggeettppggrrpp() has been omitted from POSIX.1. 4.2 Berkeley Distribution June 4, 1993 1