Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 May 1998 22:06:55 -0700 (PDT)
From:      Julian Elischer <julian@whistle.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        Dean Hollister <dean@odyssey.apana.org.au>, FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Wierd zombie process
Message-ID:  <Pine.BSF.3.95.980517220613.18213G-100000@current1.whistle.com>
In-Reply-To: <19980518100747.G427@freebie.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
just a note..
to make shells quit cleanly I use kill -HUP
as they seem to DTRT with that.


On Mon, 18 May 1998, Greg Lehey wrote:

> On Sun, 17 May 1998 at 21:46:11 +0800, Dean Hollister wrote:
> >
> > Hiyall,
> >
> > Upon trying to clear a jammed line, look at this:
> >
> > bash$ ps -t /dev/cue3
> >
> >   PID  TT  STAT      TIME COMMAND
> > 28294 cue- IEs    0:00.00  (bash)
> > 28993 cue- Z      0:00.00  (sh)
> >
> > I cannot kill either process it would seem. A kill on the first one fails
> > to result in an exit, whilst a kill on the second returns no such pid.
> >
> > Any ideas?
> 
> A zombie is a dead process whose parent is denying it a proper
> burial.  Try the l option to ps:
> 
> $ ps lax | grep Z
>   UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
>  1004  3044  3025   3  -6  0   900  520 piperd S+    p7    0:00.01 grep Z
>  1004   484   483   2  28  0     0    0 -      Z     v0    0:00.00  (rsh)
> 
> This shows that our zombie rsh (in this example) was spawned by (PPID)
> process 483.  That's the delinquent parent you need to look at:
> 
> $ ps -p 483
>   PID  TT  STAT      TIME COMMAND
>   483  v0  I      0:00.02 rsh allegro xterm -name xterm-rsxa -bg "light yellow" -s -sl 256 -sb -ls -j -rw -display free
> $ kill 483
> $ ps p484
>   PID  TT  STAT      TIME COMMAND
> $ ps lax | grep Z
>   UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
>  1004  3051  3025   2  -6  0   900  520 piperd S+    p7    0:00.01 grep Z
> 
> In other words, you have the choice of killing the parent if that's
> safe, or keeping the zombie.  In this example, which is relatively
> common, the connection has been lost to the remote system, and for
> some reason the rsh doesn't die.  It's perfectly safe to kill it.
> 
> Greg
> --
> See complete headers for address and phone numbers
> finger grog@lemis.com for PGP public key
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.980517220613.18213G-100000>