in reply to Re^2: Restarting perl script by itself
in thread Restarting perl script by itself
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
|
|---|