With python3 (3.4.3) on Ubuntu 14.04 I have created a
self.active_children = 
pid,stat = os.waitpid(0, os.WNOHANG)
if not pid: break
def fork(self, function, *args, **kwargs):
child_pid = os.fork()
if child_pid == 0:
alexand+ 24777 24735 0 20:40 pts/29 00:00:00 [python3] <defunct>
alexand+ 24838 24733 0 20:40 pts/29 00:00:00 [python3] <defunct>
Process marked as
<defunct> are called zombie processes. The system keeps them in that defunct state to allow their parent to read their status after they have finished running.
There are two ways to remove them:
signal(SIGCHLD, SIG_IGN);) at fork time, the childs will be immediately removed (no defunct state), but the parent has no more way to wait for them.