As per my understanding, exec will launch the new processNo, exec replaces your current process.... a subtle difference.
| [reply] |
Thanks, thats the point I was missing.
| [reply] |
exec replaces one process with another one, keeping the PID, file descriptors, environment and so on. No single command launches a child process, keeping the parent process paralysed, and finally kills the helpless parent. Simply because that would be very inefficient.
You should really RTFM, especially fork, exec, and system. Also read wait and waitpid.
Understanding the concept of fork and exec is essential for writing software on Unix-like systems.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] |