In a UNIX system, what happens to child processes when their parent processes exit (while the child process still has a thread of execution). i.e. (not sure how UNIX system call names vary amongst different *nixs): exec(some child process from main) and don't call wait(pid) and have an exit statement right after. Then for the child process have some large amount of code to execute (so regardless of the scheduling algorithm there should be a context switch back to main with some code still left for the child). Since the main process isn't going to wait for the child process it should exit immediately, however the child process still has some code to execute; does the child process simply terminate on the spot or will the kernel allow the child process to finish whatever it was doing and if so then who is now the parent process of this child?