[comp.unix.wizards] SIGSTOP and SIGCONT rules

srp@babar.mmwb.ucsf.edu (Scott R. Presnell) (07/27/90)

Hey all -

	I have been experementing with sending processes SIGSTOP
and SIGCONT from csh.  This is under IRIX 3.2 - and assuming that I (not
root) am doing the "kill"ing:

	When a process is started and backgrounded from csh, I can
basically STOP and CONT it from that csh or any other csh connection.
Fine.

	If I background the process and logout of the csh that started the
process, then the first time I send it STOP from another csh, the process
exits.
	
	What are the rules for sending SIGSTOP and SIGCONT to a process?
From csh?  From a daemon that nolonger has a controlling tty?  (I'm more
interested in the daemon rules.)  How does the process group relate to this?

	Thanks.

	- Scott

--
Scott Presnell				        +1 (415) 476-9890
Pharm. Chem., S-926				Internet: srp@cgl.ucsf.edu
University of California			UUCP: ...ucbvax!ucsfcgl!srp
San Francisco, CA. 94143-0446			Bitnet: srp@ucsfcgl.bitnet

jik@pit-manager.MIT.EDU (Jonathan I. Kamens) (07/28/90)

In article <srp.649092917@babar.mmwb.ucsf.edu>, srp@babar.mmwb.ucsf.edu
(Scott R. Presnell) writes:
|> 	If I background the process and logout of the csh that started the
|> process, then the first time I send it STOP from another csh, the
process
|> exits.

  This is not my experience on my BSD 4.3 system, which implies that
either your version of Unix does something funky with STOP AND CONT that
4.3 doesn't, or that the process to which you're sending the STOP signal
does something funky that causes it to exit if it doesn't have a tty
when it gets STOPped.  I tested this by logging into my machine via
telnet, typing "sleep 3000 &", logging out, and then STOPping and
CONTing the process from another xterm window as the same user.

|> 	What are the rules for sending SIGSTOP and SIGCONT to a process?
|> From csh?  From a daemon that nolonger has a controlling tty?  (I'm
more
|> interested in the daemon rules.)  How does the process group relate
to this?

  As far as I know (and I hope people will correct me if I'm wrong,
because I would like to hear about it), there aren't really any "rules"
for sending STOP and CONT to another process.  They are treated like any
other signals.  If this isn't true under IRIX and/or SysV, I'd sure like
to hear about it.

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710