I was going through some interview question on linux i found
What would happen if shell omitted the wait()??
this one i am not pretty sure what kind behavior shell or kernel show if wait() is missed, Please help.
thanks in adv.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, the shell would have no means to report the exit code of the processes it forks.
Second, without waiting, zombie processes pile up until the shell exits and they are adopted by
init.