Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I started forkbomb from normal user account say - "user1" I'm running a script which says

killall -u user1

But it didn't fix the situation.

share|improve this question
    
Is resetting the power an option? –  FrustratedWithFormsDesigner Jul 28 '10 at 13:23
    
is there any other option? Though reboot solves this issue. But it's not permanent solution.thanks for answer –  lakshmipathi Jul 28 '10 at 13:26
add comment

migrated from stackoverflow.com Jul 28 '10 at 13:26

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 11 down vote accepted

reboot the computer

if you can't, you could try:

killall -STOP -u user1
killall -KILL -u user1

If by "permanent solution", you mean preventing this happening again, well you can't really, but you can simply reduce the ulimit for the problem users and ignore them.

share|improve this answer
    
thanks setting ulimit is the permanent solution to prevent it. But killall -KILL also worked for me.thanks –  lakshmipathi Jul 28 '10 at 13:34
add comment
while true; do killall -u user1; done
share|improve this answer
add comment

I agree with Colin's answer, but I would wrap the -STOP into a script and nice --20 to ensure that the kill script gets more cpu than the 1000s bombs running.

echo "while [ 1 ]; do killall -STOP bombprocess ; done" > killscript.sh

or

echo "while [ 1 ]; do killall -STOP -u userrunningthebomb ; done" > killscript.sh

then

nice --20 ./killscript.sh

and then, after all of them stop

killall -KILL bombprocess (You should be already able to use ps again at this point)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.