setpgrp2(2) DG/UX 4.30 setpgrp2(2)
NAME
setpgrp2 - Set process-group-id.
SYNOPSIS
int setpgrp2 (pid, pgrp)
int pid;
int pgrp;
PARAMETERS
pid The process-id of the process whose process-
group-id is to be changed. A value of zero
denotes the calling process, not pid 0.
pgrp The value to which the target process's
process-group-id is to be set.
DESCRIPTION
If the access control requirements described below are met,
setpgrp2 sets the process-group-id of the process specified
by pid to the value specified by pgrp. The value of pgrp is
not required to be the process-id of an existing process;
hence a process group with no group leader can be
established.
ACCESS CONTROL
The access control requirements of setpgrp2 can be met in
one of three ways: 1) the caller has effective-user-id of
superuser, or 2) the target process is a descendant of the
caller in the process tree, or 3) the target process has the
same effective-user-id as the caller.
RETURN VALUE
0 Successful completion.
-1 An error occurred. Errno is set to indicate
the error.
EXCEPTIONS
Errno may be set to one of the following error codes:
ESRCH The process specified by pid does not exist.
EPERM None of the three conditions described in the
Access Control section above is met.
SEE ALSO
getpgrp(2), getpgrp2(2), setpgrp(2).
STANDARDS
When using m88kbcs as the Software Development Environment
target, the setpgrp2 function will be a restricted emulation
of Berkeley semantics. This emulation only allows a process
Licensed material--property of copyright holder(s) Page 1
setpgrp2(2) DG/UX 4.30 setpgrp2(2)
to join a process group already in use inside its session or
to create a new process group whose process group ID is
equal to its process ID.
Licensed material--property of copyright holder(s) Page 2