Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

setpgrp(2) [sunos man page]

setpgrp(2)							   System Calls 							setpgrp(2)

NAME
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, the setpgrp() function makes it one by setting its process group ID and session ID to the value of its process ID, and releases its controlling terminal. See intro(2) for more information on process group IDs and session leaders. RETURN VALUES
The setpgrp() function returns the value of the new process group ID. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
setpgrp(1), intro(2), exec(2), fork(2), getpid(2), getsid(2), kill(2), signal(3C), attributes(5), standards(5) SunOS 5.10 5 Jan 2000 setpgrp(2)

Check Out this Related Man Page

setpgrp(2)							System Calls Manual							setpgrp(2)

NAME
setpgrp - set process group ID SYNOPSIS
DESCRIPTION
If the calling process is not already a session leader, sets the process group ID of the calling process to the process ID of the calling process. If creates a new session, then the new session has no controlling terminal. The function has no effect when the calling process is a session leader. Security Restrictions Some or all of the actions associated with this system call may require privileges. See privileges(5) for more information. RETURN VALUE
Upon successful completion, returns the new process group ID. ERRORS
If fails, no changes occur and (see errno(2)) is set to one of the following values: The calling process is already a process group leader or the process group ID of a process other than the calling process matches the process ID of the calling process. The calling process does not have sufficient privileges. SEE ALSO
exec(2), fork(2), getpid(2), getsid(2), kill(2), setpgrp3(2), setsid(2), privileges(5), <unistd.h>. STANDARDS CONFORMANCE
setpgrp(2)
Man Page