Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!tut.cis.ohio-state.edu!uc!nic.MR.NET!nic.stolaf.edu!nic.stolaf.edu!fritchie From: fritchie@sachiko.acc.stolaf.edu (Scott Fritchie; ACC @ St. Olaf College) Newsgroups: comp.unix.questions Subject: Re: How do you handle while(1) fork(); ? Message-ID: Date: 29 Jul 90 22:53:09 GMT References: <841@massey.ac.nz> Sender: news@acc.stolaf.edu Organization: /home/sachiko/fritchie/.organization Lines: 23 In-Reply-To: ARaman@massey.ac.nz's message of 10 Jul 90 23:14:56 GMT In article <841@massey.ac.nz> ARaman@massey.ac.nz (A.V. Raman) writes: Is there any way to kill all instances of a process that has the following piece of code in it without having to bring the system down? while (1) fork(); For BSD, if you've got a super-user shell handy, you can send SIGSTOP signals to all of the offending processes using something along these lines: ps tXX | grep -v PID | awk '{print $1}' | xargs kill -STOP Once the forking (:-) processes have been stopped, they can be terminated at leisure by hand or using a variation of the above pipeline. -Scott --- Scott Fritchie, 4810 Underwood Ave., Omaha, NE 68132-2420 USA fritchie@acc.stolaf.edu ..!umn-cs!stolaf!fritchie (402) 553-4084 "Yeah, boss, I'll be in late today. UNIX refuses to boot on my Ford."