X11R6, openwin, and zombies

X11R6, openwin, and zombies

Post by J. Theodore Co » Wed, 26 Apr 1995 04:00:00



I am running X11R6 and openwin on my Dell Latitude XP
laptop with the svga server.  It works great, but every
time I exit a process I create a "zombie" as revealed by
ps.  For instance, if I fire up an xterm, and then exit
from it, ps will reveal it is "still there" as a zombie.
Is this a well known problem?  Any solutions.

Thanks,
Ted Cox

 
 
 

X11R6, openwin, and zombies

Post by Sergio Gela » Mon, 01 May 1995 04:00:00




Quote:>I am running X11R6 and openwin on my Dell Latitude XP
>laptop with the svga server.  It works great, but every
>time I exit a process I create a "zombie" as revealed by
>ps.  For instance, if I fire up an xterm, and then exit
>from it, ps will reveal it is "still there" as a zombie.
>Is this a well known problem?  Any solutions.

How do you create your processes? The zombie will remain there as
long as its parent process is still alive and fails to do a wait().
So:
-- if you start your processes by forking twice, and the first forked
process exits right away and is waited for by its parent, no zombies.
(The second process will become a child of init, and init wait()s often.)
-- if you start your processes from an interactive bash session (i.e.,
if you just type "xterm &" from within one of your windows), you can just
use the "wait" builtin from time to time. If it doesn't return immediately,
hit ctrl/c: it will have reaped all the zombies it could find at that point.
Don't know if tcsh has this feature, sorry.

You probably start your processes from a window manager menu. In that
case, the answer may depend on the window manager you use, and on how the
menu files are written. With olvwm, and with an entry like "exec xterm -ut -e
bash" to start my xterm, I get no zombies when I exit bash with ctrl/d.

if you just type "xterm &")