in reply to How to get the PID of an invoked process

You may want to use Super Search first - there is a good chance that someone in the past has discussed something similar :)
Check out this node: Process ID of a Launched Program
  • Comment on Re: How to get the PID of an invoked process