Here is good information about difference between foreground process groups and background:
https://www.win.tue.nl/~aeb/linux/lk/lk-10.html

Shortly, there is only one process group which is foreground, you can get it with tcgetpgrp(fd) or set it with tcsetpgrp(fd,pgrp). To setup process group of the process use setpgid(pid, pgid);

Reply via email to