How do you handle while(1) fork(); ?
Scott Fritchie; ACC @ St. Olaf College
fritchie at sachiko.acc.stolaf.edu
Mon Jul 30 08:53:09 AEST 1990
In article <841 at massey.ac.nz> 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();
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 at 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."
More information about the Comp.unix.questions
mailing list