/* A program that launches a parent and a child process by
   using the fork() system call.
   Written by Andre M. Maier, dhbw@andre-maier.com */

#include <unistd.h>
#include <stdio.h>

int main(int argc, char **argv)
{
   if(fork()==0)
   {
      printf("Child process (PID %d) started.\n", getpid());
   }
   else
   {
      printf("Parent process (PID %d) started.\n", getpid());
   }
   while(1) 
   {
      sleep(100);
   }
   return 0;
}
