From owner-freebsd-questions Sun May 17 17:38:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA27119 for freebsd-questions-outgoing; Sun, 17 May 1998 17:38:10 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from freebie.lemis.com (freebie.lemis.com [139.130.136.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA27031 for ; Sun, 17 May 1998 17:37:45 -0700 (PDT) (envelope-from grog@lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id KAA03054; Mon, 18 May 1998 10:07:47 +0930 (CST) (envelope-from grog) Message-ID: <19980518100747.G427@freebie.lemis.com> Date: Mon, 18 May 1998 10:07:47 +0930 From: Greg Lehey To: Dean Hollister , FreeBSD Questions Subject: Re: Wierd zombie process References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from Dean Hollister on Sun, May 17, 1998 at 09:46:11PM +0800 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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