#include <stdio.h>

main () {

 int i, pid, whoAmI ;

   printf ("cs 347 class \n");


   whoAmI = fork ();


   pid = getpid();

   if (whoAmI ==0) printf ("inside child .. i.e. pid %d\n", pid);
   else printf ("inside parent .. i.e. pid %d\n", pid);

   printf ("in process %d, waiting for an int..\n",pid);
   scanf ("%d",&i);

   printf("process %d gets %d\n", pid, i);

 // which processs is picking the first input ? why? 

}


