spgrp() 4.X

Larry Kaplan lkaplan at bbn.com
Thu Sep 7 06:30:51 AEST 1989


I'm looking for information regarding the 4.x routine called spgrp.
It is only called from exit with a comment to the effect of
protecting the exiting process from future tty signals.
It claims to clear TSTP/TTIN/TTOU if pending in the exiting process and
all its descendents.

This routine has been causing us some problems and so we are trying what its
true purpose is.  I have noted that elsewhere in the signal code that 
delivering a terminal stop signal to a process whose parent is init causes
that process to be killed.  So the only explanation I can come up with
for spgrp() is that it catches the case where a process is about to be inherited
by init and gets a terminal stop.  Before it processes it, its parent exits
causing the process to be inherited.  spgrp() then clears the signal to
prevent it from being killed.  Note that this doesn't work if the process was
asleep when the signal arrived since it will end up stopped right away and
the signal will no longer be in the process's signal list.

This doesn't appear too useful so I am probably missing something.  Any clues??

By the way, our source are derived from CMU MACH release 1.0 which is derived
4.3 BSD, I believe.

Please respond directly to me as I do not normally read this group.
_______________________________________________________________________________
				 ____ \ / ____
Laurence S. Kaplan		|    \ 0 /    |		BBN Advanced Computers
lkaplan at bbn.com			 \____|||____/		10 Fawcett St.
(617) 873-2431			  /__/ | \__\		Cambridge, MA  02238



More information about the Comp.unix.wizards mailing list