SETPGRP(2J) GENIX Programmer's Manual SETPGRP(2J)
NAME
setpgrp, getpgrp - set/get process group
SYNOPSIS
int getpgrp(pid)
setpgrp(pid, pgrp)
cc ... -ljobs
DESCRIPTION
The process group of the specified process is returned by getpgrp.
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.
This call is used by csh(1) to create process groups in implementing
job control. The TIOCGPGRP and TIOCSPGRP calls described in tty(4)
are used to get/set the process group of the control terminal.
See jobs(3) for a general discussion of job control.
SEE ALSO
jobs(3), getuid(2), tty(4)
BUGS
The job control facilities are not available in standard version 7
UNIX. These facilities are still under development and may change
in future releases of the system as better inter-process communica-
tion facilities and support for virtual terminals become available.
The options and specifications of these system calls and even the
calls themselves are thus subject to change.
A system call setpgrp has been implemented in other versions of UNIX
which are not widely used outside of Bell Laboratories; these imple-
mentations have, in general, slightly different semantics.
Printed 11/16/83 1