What is the difference between system and exec family commands? Especially I want to know which one of them creates child process to work?
System() will create child process and invoke another sub shell while exec() will not create child process.Given Example will clear difference.
some code...
exec('ls -l')
echo "1 2 3" // This will not executed in bash (as exec command use same shell)
some code ...
system (ls -l) echo "1 2 3" // This will be executed after finishing System child process as they are different from parent PID.