<defunct>: too many from pipe

Andy Green andy at warmcat.com
Mon Aug 20 18:24:25 UTC 2007


Somebody in the thread at some point said:

> 1. Is there any way to get rid of these defunct processes
>    other than stopping the daemon?

If the spawning parent occasionally does a

 int n;

...
 waitpid(-1, &n, WNOHANG);

then it will clean up the zombies.  Like a ghost that cannot go on to
the afterlife because it has a terrible secret it must tell someone, the
zombies are hanging on grimly so they can whisper their process return
code into their parents' ear before finally fading away.

> 2. How many of these can pile up before my system crashes?

Quite a lot apparently, hundreds at least.

-Andy




More information about the users mailing list