Differences between version 9 and revision by previous author of ProcessGroup.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 9 | Last edited on Tuesday, September 4, 2007 5:49:39 pm | by BenStaz | Revert |
Older page: | version 6 | Last edited on Tuesday, January 2, 2007 10:11:03 pm | by LawrenceDoliveiro | Revert |
@@ -1,5 +1,19 @@
-Process groups are used for distribution of signals, and by terminals to arbitrate requests for their input and output: Processes that have the same
process group as
the terminal are
foreground and may read, while others will block with a signal if
they attempt to
read. These calls are thus used by programs such as csh(1)
to create
process groups in implementing job control
. The [TIOCGPGRP] and [TIOCSPGRP] calls described in termios(4) are used to get/set the process group of the control terminal.
+A Process group is a collection of related processes. One important feature is that it is possible to send a signal to every process in the group. Typically when the shell creates a process to run an application, the process is placed into a new process
+group. As that application forks new processes, the processes are all members of the process group.
Process groups are used for distribution of signals, and by terminals to arbitrate requests for their input and output:
+
+!Foreground Process Groups
+
+* A foreground
process has read and write access to
the terminal.
+* Every process in the
foreground receives [SIGINT] [SIGQUIT]
and [SIGSTP] signals.
+* Usually consists of the processes forked by the shell and all the processes
they fork.
+
+!Background Process Groups
+
+* A background process does not have
read access to the terminal
.
+* If a background process attempts
to read from its controlling terminal its
process group will be sent a [SIGTTIN]
.
+
+
The [TIOCGPGRP] and [TIOCSPGRP] calls described in termios(4) are used to get/set the process group of the control terminal.
If a ProcessGroup has a ControllingTerminal, [CLOCAL] is not set and a hangup occurs, then the ProcessGroup is sent a [SIGHUP].
If a ProcessGroup Leader exits, all children processes are sent a [SIGHUP]