in reply to Re: Executing perl script from perl script.
in thread Executing perl script from perl script.

The problem with this standard approach is that it may leave orphaned children behind. Unless you set up a process group, you have no single 'handle' to all the processes that belong together. You only have the PID of the parent process that P1.pl directly created, but not of its children and grandchildren, etc. (and it's non-trivial, or at least cumbersome, to find them out).

So what you would kill is just that one process. And there's no guarantee whatsoever that it will take care of 'cleaning up' by itself...

  • Comment on Re^2: Executing perl script from perl script.