in reply to Re: How do you get PID of a program called using system call?
in thread How do you get PID of a program called using system call?

With this approach in mind, your best solution would be to iteration through the process table following execution of your system processes. Under *NIX, you would want to use Proc::ProcessTable (which I have written about before here). For Windows, you should take a look at either Win32::Process or Win32::ProcFarm.

Even so, I still think that you would find the best solution from pre-forking within your script, rather than launching system processes and detaching yourself from the controlling tty. This pre-forking approach would give you greater control, without the need to extraneous loops and control structures, of your spawned processes.

 

Ooohhh, Rob no beer function well without!

  • Comment on Re: Re: How do you get PID of a program called using system call?