Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ucla-cs!zen!ucbvax!decvax!tektronix!tekgen!puffin!penguin!richl From: richl@penguin.USS.TEK.COM (Rick Lindsley) Newsgroups: comp.unix.questions Subject: Re: SIGSTOP - what is it? Message-ID: <47@puffin.USS.TEK.COM> Date: Fri, 3-Jul-87 12:05:38 EDT Article-I.D.: puffin.47 Posted: Fri Jul 3 12:05:38 1987 Date-Received: Sat, 4-Jul-87 15:31:38 EDT References: <3786@spool.WISC.EDU> Sender: nobody@puffin.USS.TEK.COM Reply-To: richl@penguin.USS.TEK.COM (Rick Lindsley) Organization: Tektronix, Inc., Beaverton, OR. Lines: 21 In article <3786@spool.WISC.EDU> lm@cottage.WISC.EDU (Larry McVoy) writes: > Does anyone know what the SIGSTOP signal is - it's not the keyboard (^Z) stop > signal. So what's it there for? It's analogous to SIGKILL in that it can't be caught or ignored. That makes it handy when you may not want to kill a process, just stop it. One use of it: we had a user once who wanted to practice playing with fork(). So he wrote a simple C program ... basically "for (i=0;i<20;i++) while (fork()<0);" He thought this would create 20 processes. Of course it doesn't; it creates a LOT more. He quickly reached his process limit, thankfully, but killing one of these didn't do any good -- as soon as there was room, one of the forks would succeed and we'd be off to the races. There was one very easy solution, though -- SIGSTOP them all, THEN SIGKILL them all. (A second solution would be nice them all to 20 before killing them, though that's not as certain.) Another use for it would be stopping processes for backups on a "live" filesystem. We used to do that on one or two busy machines. The processes cannot ignore the signal, so you can essentially grind things to a halt without destroying context. Rick