2003-05-22  Roland McGrath  <roland@redhat.com>

	* defs.h (struct tcb): New member `nzombies'.
	* strace.c (alloctcb): Initialize it.
	(droptcb): Increment our parent's zombie count.
	* process.c (internal_wait): Don't go into TCB_SUSPENDED if the
	process has zombies it can reap.  On the way out, if we reaped
	an untraced process, decrement the zombie count.
diff --git a/defs.h b/defs.h
index 9889efe..4138894 100644
--- a/defs.h
+++ b/defs.h
@@ -263,6 +263,7 @@
 	struct tcb *parent;	/* Parent of this process */
 	int nchildren;		/* # of traced children */
 	int waitpid;		/* pid(s) this process is waiting for */
+	int nzombies;		/* # of formerly traced children now dead */
 #ifdef LINUX
 	int nclone_threads;	/* # of nchildren with CLONE_THREAD */
 	int nclone_detached;	/* # of nchildren with CLONE_DETACHED */