What is the difference between the following fork statements ?
command &exec command &
You can use wait $! for both statements.
In my test I have found no difference in the behavior – but maybe I’m missing something.
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.
The
&overrides theexecsince you can’t both replace the existing process with a new process and run the new process in the background.