linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jeff <jko@bsn1.net>
To: linux-assembly@vger.kernel.org
Subject: Re: Child Detection
Date: Thu, 8 Sep 2005 10:08:24 -0700	[thread overview]
Message-ID: <200509081008.24853.jko@bsn1.net> (raw)
In-Reply-To: <op.swrh5angl4sb1n@sucks.airplane.fire>

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



      reply	other threads:[~2005-09-08 17:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08  2:21 Child Detection Richard Cooper
2005-09-08 17:08 ` jeff [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200509081008.24853.jko@bsn1.net \
    --to=jko@bsn1.net \
    --cc=linux-assembly@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).