setpgrp(2)
setpgrp --
set process group ID
Synopsis
#include <sys/types.h>
#include <unistd.h>
pid_t setpgrp(void);
Description
If the calling process is not already a session leader, setpgrp
sets the process group
ID
and session
ID
of the calling process to the process
ID
of the calling process, and releases the calling process's
controlling terminal.
Return values
On success, setpgrp returns the value of the new process group
ID.
References
exec(2),
fork(2),
getpid(2),
intro(2),
kill(2),
setsid(2),
signal(2)
Notices
setpgrp will be phased out in favor of the
setsid(2)
function.
setsid(2)
Considerations for threads programming
This ID number is an attribute of the containing process
and is shared by sibling threads.
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.