How do you handle while(1) fork(); ?
Kishore Seshadri
kseshadr at quasar.intel.com
Sat Jul 14 03:36:27 AEST 1990
In article <1990Jul11.115612.2155 at aucs.uucp>, peter at aucs (Peter Steele) writes:
>ARaman at 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 at mipos3.intel.com
===============================================================================
Kishore Seshadri (Speaking only for myself) Intel Corp., Santa Clara, CA
CSNET: kseshadr at mipos3.intel.com ARPA: kseshadr%mipos3.intel.com at relay.cs.net
UUCP:{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!kseshadr
More information about the Comp.unix.questions
mailing list