[EMAIL PROTECTED] wrote:
Hi,

Thanks for the reply,

Indeed our code solves the problem but not efficiently. Your have to iterate over all running processes in order to filter the child processes.

I wondered if there is a possibility to directly get the child processes.

No. In UNIX, every process records its parent pid but the parent does not store its children's; you do that inside your program. This is because when a child changes state it would have to inform its parent and the parent has to keep track of it. This is too much overhead and would slow down the system.

BTW, a child process means only the first level. What you are talking about are all of a process's descendants.


--
Just my 0.00000002 million dollars worth,
   Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to