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 4/6/89 1
%%index%%
na:312,79;
sy:391,424;
de:815,550;
di:1365,610;
rv:1975,280;
se:2255,130;
%%index%%000000000107