Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!orc!inews!kseshadr@quasar.intel.com From: kseshadr@quasar.intel.com (Kishore Seshadri) Newsgroups: comp.unix.questions Subject: Re: How do you handle while(1) fork(); ? Message-ID: <2473@inews.intel.com> Date: 13 Jul 90 17:36:27 GMT References: <841@massey.ac.nz> <1990Jul11.115612.2155@aucs.uucp> Sender: news@inews.intel.com Reply-To: kseshadr@quasar.intel.com (Kishore Seshadri) Organization: Intel Corporation, Santa Clara, California Lines: 28 In-reply-to: peter@aucs.uucp (Peter Steele) In article <1990Jul11.115612.2155@aucs.uucp>, peter@aucs (Peter Steele) writes: >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(); > >>Any help (by email) would be appreciated. I actually haven't had to deal with this, but wouldn't killing the login shell of the "offender" handle the simple cases like this? Of course, this may not work for cases where the process has detached itself from the tty or changed its process group. You could try writing something that does a vhangup on the offender's tty and then actually go through the proc table looking for other processes owned by the person. This may be pretty drastic solution, however! I'd be interested in hearing other ways of doing this. Kishore kishore@mipos3.intel.com =============================================================================== Kishore Seshadri (Speaking only for myself) Intel Corp., Santa Clara, CA CSNET: kseshadr@mipos3.intel.com ARPA: kseshadr%mipos3.intel.com@relay.cs.net UUCP:{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!kseshadr