Hi, im forking 3 times in a loop like this but the variable "count" does not increment, it stays on '1' and therefore this is an infinite loop, and this simple thing dont make sense to me, some extra eyes to help me plz?

I have checked so that the pointer adress is the correct one every loop.

Code:
void increase(int* x)
{
 *x += 1;
}


main()
{
 int pid, i, number = 0;


 for(i = 0 ; 0 < 3 ; i++)
 {
  pid = fork();


  if(pid == -1)
  {
   exit(0);
  }
  else if(pid == 0)
  {
   increment(&number);


   sleep(3);
   exit(0);
  }
  else
  {
   waitpid(-1, NULL, 0);


  if(number >= 3)
  {
   exit(0);
  }
 }
}
 sleep(5);
}