fixed issue in pidUsed and exit. i set the parent pointer of the childs to null if we exit
fork, wait, exit mechanism changed. don't use the thread_join anymore. two new semaphores added to handle the wait, exit.