So I have a friend who had an ssh server running on his Raspberry Pi (This question isn't a problem specific to RPi, so that's why I'm posting here). I logged in over ssh, and ran :(){ :|: & };:, as a joke. He texted me and asked me what I did, and why his Pi was lagging so bad, and I told him and he sent back the laughing emoji. He asked how to fix it, so I told him to reboot. He did and told me that it was still lagging, but he had a minute or so before it froze up again. I did not know that the fork bomb would persist after a reboot. He has managed to (kinda) fix this. I just asked him what he did, and he replied with "First I tried ulimit, that had minimal effectiveness. Then, I ran a while loop from terminal that killed the process every second." I have no idea how he got the process name to kill.
So the problem is that even though there is a script running to kill the processes every second, his Pi keeps jumping off of the network. I don't know why this is happening. How can we completely eradicate the fork bomb?
(By the way, he is not mad at me [That I know of], and he has said he is not mad)