.TH setpgrp() "" "" "System Call (libc)"
.PC "Make a process a process-group leader"
\fBint setpgrp()\fR
.PP
.B setpgrp()
sets the requesting process's process-group identifier
to its own process identifier.
This detaches the process from its parent group and makes it
the leader of its own processing group.
If the process is not already a process-group leader,
it is detached from its controlling terminal.
.PP
.B setpgrp()
returns the new process-group identifier.
.SH "See Also"
.Xr "getpgrp()," getpgrp
.Xr "libc" libc
.SH "Notes"
This function is obsolete, and is being phased out in favor of the function
.BR setsid() .
