setpgrp(2) DG/UX 5.4.2 setpgrp(2)
NAME
setpgrp - set process-group-id
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
gid_t setpgrp ()
DESCRIPTION
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.
ACCESS CONTROL
No access checking is performed.
RETURN VALUE
process-group-id The new value of the calling process's
process-group-id.
DIAGNOSTICS
None.
SEE ALSO
getpgrp(2), getpgrp2(2), setpgrp2(2).
STANDARDS
When using m88kbcs as the Software Development Environment target,
the setpgrp function will be emulated using BCS system calls. Since
this is an emulation requiring several BCS system calls, a slight
performance degradation may be noticed in comparison to using
berk_signal in /lib/libc.a.
The only way for a session to allocate a controlling terminal is for
the session leader (which must not already have a controlling
terminal) to open a terminal device that is not already associated
with any session, without using the O_NOCTTY option to open. The
effect is that the processes in a session may have at most one
controlling terminal, and a terminal may have at most one controlling
process, which must be a session leader. When the controlling
process terminates, an automatic vhangup occurs on the terminal and
its terminal characteristics are reset.
Licensed material--property of copyright holder(s) 1