fork, wait, exit mechanism changed. don't use the thread_join anymore. two new semaphores added to handle the wait, exit.