From owner-freebsd-questions Sun May 17 22:13:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA06248 for freebsd-questions-outgoing; Sun, 17 May 1998 22:13:49 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA06240 for ; Sun, 17 May 1998 22:13:40 -0700 (PDT) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id WAA25521; Sun, 17 May 1998 22:07:06 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd025515; Mon May 18 05:06:58 1998 Date: Sun, 17 May 1998 22:06:55 -0700 (PDT) From: Julian Elischer To: Greg Lehey cc: Dean Hollister , FreeBSD Questions Subject: Re: Wierd zombie process In-Reply-To: <19980518100747.G427@freebie.lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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