in reply to PID problem...

ProcessTable is for you, or parse the result of the system call of 'ps'.

--
tune