title: how to make two child processes waiting for each other
body: <p>I am studying about processes in operating systems. I came up with a question in which I have to create two child processes to do similar task using fork and wait. After the parent fork the first child, that child will wait until parent fork another one and the second child finish its job. </p>
  
  <h2>For example, if I want the first child displays 10 first even numbers and the second child displays 10 first odd number, the output should be like this:</h2>
  
  <p>Second child
  1 3 5 7 9 11 13 15 17 19
  second child dies
  First child
  2 4 6 8 10 12 14 16 18 20
  first child dies</p>
  
  <h2>end!</h2>
  
  <p>I've been trying various ways but I couldn't make the first child wait until the second child finishing its job.
  Does anybody know how to do it? 
  Thanks</p>