Re: defunct processes don't always go away when parent does waitpid(-1)

From: Gary R. Hook (noway_at_nospammers.net)
Date: 10/31/05


Date: Mon, 31 Oct 2005 17:13:59 GMT

Tao Chen wrote:
> Rob Y wrote:
>
>> Presumably, my once-per-minut waitpid(-1)
>> should clean them all up, no?
>
> No, it takes only one child.

That would be incorrect (the "no" part). Repeated calls to waitpid
to "sample" and harvest any children is the right thing to do. You
should pick up another child every time you call, so you might

1) ensure that you make enough calls to pick up all the kids

2) look for any APARs that may be relevant, or update to the latest
level of your AIX release



Relevant Pages

  • Re: Thread question
    ... Any threads that are started by the main thread can start child ... >>#2 is incorrect. ... >>continue to execute. ...
    (comp.lang.java.programmer)
  • Re: newbus flaw
    ... John-Mark Gurney writes: ... > You are incorrect in assuming you can't find out if another child already ... Usually this is a problem of properly allocating resources so ... > that you know the other child exists. ...
    (freebsd-arch)
  • Re: unix pipe problems
    ... > '&buffer' is incorrect. ... > You never initialized 'wordsize' in the child. ... that the child process finishes before the parent can ever send ...
    (comp.unix.programmer)
  • Re: children not getting eof from pipe
    ... > The value of $read here is incorrect except for the last child. ... > children are reading from the same pipe, ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: ACT test question...
    ... Youve obviously never had to raise a bright child. ... And what does his education have to do with "his childhood?" ... Youre clearly an idiot. ... Rob Rob Rob, love.... ...
    (rec.org.mensa)