int tcsetpgrp(int fildes, pid_t pgid_id);
and
int setpgrp(void);
I don't really understand difference and purpose of this two functions. Of course man page
has been previously read.
But I still don't understand purpose and use of this functions. It is clear to set group. But why do we need both of them. What is the difference between terminal group and process group.
Please explain this. I would be very grateful.