View Single Post

   
  #4 (permalink)  
Old 01-05-2008, 06:14 AM
Jose Pina Coelho
 
Posts: n/a
Default Re: who owns a defunct process

Jurjen Oskam <joskam@quadpro.stupendous.org> wrote in
news:slrncpbhhf.fef.joskam@calvin.stupendous.org:

> On 2004-11-12, Ken <ucstyle@hotmail.com> wrote:
>
>> Does anyone know how to check all the processes of a defunct process?
>> I would like to see what program, application, etc actually owned the
>> process that's now defunct. I know there's a way in SUN but not sure
>> in AIX.

>
> I'm not 100% sure, but doesn't the PPID of a zombie remain available?

Yes.

> If so, you can just check with 'ps' which process is the current
> parent of the zombie.
>
> Note that this might not give the results you expect: if a process
> spawns a lot of zombies and then exits itself, the zombies get
> re-parented to the (innocent) parent process of the zombie-spawning
> process.


There are no inocents. Any process that spawns sub-processes must set a
handler to SIGCHILD to reap them as they die.

> So this process now has zombies, but isn't responsible for
> them.

It may not have launched them direcly, but when they got reparented they
should have been reaped.

> When the zombies eventually get reparented to init, they are
> periodically reaped.

Unless someone messed up /etc/inittab :-)

--
Doing AIX support was the most monty-pythonesque
activity available at the time.
Eagerly awaiting my thin chocolat mint.
Reply With Quote