Path: utzoo!utgpu!watserv1!watmath!att!dptg!mtune!jrw From: jrw@mtune.ATT.COM (Jim Webb) Newsgroups: comp.unix.questions Subject: Re: How do you handle while(1) fork(); ? Message-ID: <671@mtune.ATT.COM> Date: 11 Jul 90 14:34:59 GMT References: <841@massey.ac.nz> Organization: AT&T BL Middletown/Lincroft NJ USA Lines: 22 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(); Under System V, running "kill -9 -1" will send the kill to all processes belonging to the invoking user. So, to stop the above, you could do that as the user (if s/he has any processes left) or by becoming root and then entering: su pest -c "kill -9 -1" if no process slots are available to the user. Obviously, this kills everything that user is running, not just the above wonderfulness. Have fun. -- Jim Webb "Out of Phase -- Get Help" att!mtune!jrw "I'm bored with this....Let's Dance!"