This function returns the value of the process group ID for the
foreground process associated with the terminal. The file descriptor
fd must be connected to the terminal, otherwise the function will
fail.
Return Value
If fd is connected to the terminal, the function returns the
process group ID, which is currently identical to the value returned by
getpgrp() (see section getpgrp). Otherwise, it returns -1 and sets
errno to ENOTTY.
Please take a moment to fill out
this visitor survey You can help support this site by
visiting the advertisers that sponsor it! (only once each, though)