Re: How to avoid zombie processes?



On Sep 12, 6:33 pm, Lambda <stephenh...@xxxxxxxxx> wrote:
The APUE section 8.6 mentions a method to avoid zombie processes.
The trick is to call fork twice:
[snip]
But I cannot understand why this code could avoid zombie.
Can you explain it?

Since your child dies immediately after creation, and you reap it,
there is no child *of* *yours* left around to become a zombie.

DS


.



Relevant Pages

  • Re: bug in dbCreateLib / ddCreateLib ??
    ... That's the problem - the library doesn't exist on that specific machine, so the ddGetObj returns nil, triggering the creation of a new library, which automatically adds the necessary line to the user's cds.lib. ... The trick is to delete the library as one of the last steps on the remote job. ...
    (comp.cad.cadence)
  • Re: Weird, minor, but very annoying issue with generated DOM-elements in IE7
    ... Setting the messagebox size on creation ... did the trick. ... for this crappy browser, I'm sorry to say. ...
    (microsoft.public.scripting.jscript)
  • Re: computation of square root & reciprocal calculation
    ... Even if Jim Blinn didn't have a hand in its creation, ... an interesting read and he might give some credit to where he first saw ... That trick dates from the early 1950s. ...
    (comp.arch.arithmetic)
  • Re: Double vlookup
    ... it is what I am using but I would like a trick to avoid the ... creation of a new column with the concatenation of my 2 colmns. ...
    (microsoft.public.excel.misc)