Penguin

Differences between current version and previous revision of ProcessGroup.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 11 Last edited on Tuesday, September 4, 2007 6:09:44 pm by BenStaz
Older page: version 10 Last edited on Tuesday, September 4, 2007 5:50:31 pm by BenStaz Revert
@@ -10,16 +10,30 @@
 !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]. 
+  
+!Example  
+  
+Notice that cat, sort and uniq all have the same PGID (Process Group ID).  
+<verbatim>  
+staz@tokra:~/log$ cat results | sort | uniq & ps -jf  
+[1] 1239  
+UID PID PPID PGID SID C STIME TTY TIME CMD  
+staz 1237 28341 1237 28341 0 17:55 pts/6 00:00:00 cat results  
+staz 1238 28341 1237 28341 0 17:55 pts/6 00:00:00 sort  
+staz 1239 28341 1237 28341 0 17:55 pts/6 00:00:00 uniq  
+</verbatim>  
  
 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] 
  
 If the exit of the process causes a process group to become orphaned, and if any member of the newly-orphaned process group is stopped, then a [SIGHUP] signal followed by a [SIGCONT] signal will be sent to each process in the newly-orphaned process group. 
+  
+  
  
 !! See Also 
  
 * ProcessRelationships