UPDATE:
I had a slight mistake in the code, so now I can tell that the parent is not waiting. But it seems that the children didn't update any global variables. I figured that it is because everything they do can't be shared with the parent. Is there a way to share variables between processes? Thanks for the help.