int setpgid(pid_t pid, pid_t pgid); int setpgrp();
- setpgid() sets the process group ID of the process specified by pid to pgid. If pid is zero, the process ID of the current process is used.
- The call setpgrp() is equivalent to setpgid(0,0).
- Both functions return 0 for success and -1 for error. On error errno is set.