What is the difference of 'exec cmd &' and 'cmd &' in bash scripting?
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.
The & overrides the exec since you can't both replace the existing process with a new process and run the new process in the background.