title: How can I kill all processes of a program?
body: <p>I wrote a program that forks some processes with fork(). I want to kill all child- and the mother process if there is an error. If I use exit(EXIT_FAILURE) only the child process is killed.</p>
  
  <p>I am thinking about a system("killall [program_name]") but there must be a better way...</p>
  
  <p>Thank you all!
  Lennart</p>