SETPGRP(2) COMMAND REFERENCE SETPGRP(2)
NAME
setpgrp - set process group
SYNOPSIS
setpgrp(pid, pgrp)
int pid, pgrp;
DESCRIPTION
Setpgrp sets the process group of the specified process pid
to the specified pgrp. If pid is zero, then the call
applies to the current process.
If the invoker is not the super-user, then the affected
process must have the same effective user ID as the invoker
or be a descendant of the invoking process.
DIAGNOSTICS
Setpgrp will fail and the process group will not be altered
if one or more of the following occur:
[ESRCH]
The requested process does not exist.
[EPERM]
The caller is not the super-user, the effective user ID
of the requested process is different from that of the
caller and the process is not a descendent of the
calling process.
RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and errno is set to
indicate the error.
SEE ALSO
getpgrp(2).
Printed 10/17/86 1
%%index%%
na:72,63;
sy:135,276;
de:411,478;
di:889,519;
rv:1408,236;
se:1644,100;
%%index%%000000000105