Re: Child Detection

jeff <[email protected]>
Newsgroups org.kernel.vger.linux-assembly
Message-ID <[email protected]>
On 09/07/2005 07:21 pm, Richard Cooper wrote:
> Is there some way in Linux to detect if your process has any children?
> -
I have not found a good way to do this, but the following features cam
be used to do it:

1. sending kill to any process with ecx=0 will  return its status, this
    contains the parent process.

 2. It is possible to walk through all the process by using the /proc
     file system. 

AsmLib has functions to walk the /proc file system and return status
of a process.  I think most programs keep track of their processes and
do not need to do a search.

My kernel documentation says the PID's are assigned by increment the
parent id?  If this is true it is possible to do a quick search for children
by encrementing the parent id and checking status?

 all the best, jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.