#include <stdlib.h>
#include <unistd.h>
int main()
{
while(1)
fork();
}
This is the code for a fork bomb.
In our college, we connect via telnet i.e client serving protocol. Some 100 systems are connected to server. Suddenly we saw the server becoming slow, and after some time it crashed. I came to know that sombody implemented a fork bomb.
How can we detect on which system the fork bomb is implemented? And how can we stop it?
One method is to limit the maximum number of processes that a single user may own. Is there any method to stop it and to know from which system it has been implemented?