setpgrp(C)
setpgrp --
set the process group of a program
Syntax
setpgrp command [ arguments ]
Description
setpgrp allows the creation of a new process group
with the program command as the process group leader.
command must specify its path explicitly if it is not
already set in the PATH of the environment of the
calling shell.
command also retains the controlling terminal,
environment, open file descriptors, and signal mask of
the calling shell. See
execvp(S)
for a full description of the properties that are inherited.
setpgrp allows a given tty, such as a modem port, to become
the controlling terminal for command which runs within
its own process group as the process group leader.
If the connection is broken, processes in command's
process group will terminate unless they trap SIGHUP.
If the shell that invoked setpgrp exits, a command
that traps SIGHUP continues to run as it is within its own
process group.
Examples
Set a command that reads from the modem port running in the
background over a modem connection
(typically, a shell script invoking a program such as
uucico(ADM)):
setpgrp uu_script arg1 arg2 &
See also
execvp(S),
kill(C),
nice(C),
nohup(C),
perror(S),
setpgrp(S),
signal(S)
Standards conformance
setpgrp is conformant with
AT&T SVID Issue 2.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003