setpgrp - set the process group ID
If the calling process is not already a session leader, setpgrp() sets the process group ID of the calling process to the process ID of the calling process. If setpgrp() creates a new session, then the new session has no controlling terminal.
The setpgrp() function has no effect when the calling process is a session leader.
Upon completion, setpgrp() shall return the process group ID.
No errors are defined.
None.
None.
None.
None.
exec(), fork(), getpid(), getsid(), kill(), setpgid(), setsid(), the Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
First released in Issue 4, Version 2.
Moved from X/OPEN UNIX extension to BASE.