Re: Zombies

From: Oliver Fromme <olli(at)secnetix.de>
Date: Wed, 26 Mar 2003 18:34:16 +0100 (CET)

Dieter Deinert <dd(at)radio-do.ath.cx> wrote:
> hier laeuft aus den Ports sntop.
>
> Jedesmal wenn dieses Porgramm sein Alarmscript startet, bleibt hinterher
> eine Shell als Zombie haengen :-(
>
> xx(at)isi-gate[~]<102>> ps -aux | grep Z
> USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
> admin 61149 0.0 0.0 0 0 v0 Z 12:09PM 0:00.00 (sh)
>
> Wo bin ich blind;-))? Was ist an diesem Script falsch?

Das Script ist in Ordnung. Die Entstehung eines Zombies
ist normalerweise nicht die Schuld des Prozesses selbst,
sondern desjenigen, der ihn gestartet hat, also in diesem
Fall wohl sntop.

Ich kenne sntop nicht, tippe aber mal darauf, daß es einen
Bug haben muß, der dazu führt, daß es den Exit-code seines
Child-Prozesses (d.h. Deines Shell-Skripts) nicht abholt.
Sowas führt halt dazu, daß der Prozeß als Zombie verbleibt,
bis das sntop seinen elterlichen Pflichten nachkommt.

Du kannst ja mal testweise ein SIGCHLD an den sntop-Prozeß
schicken. Übrigens, »ps -alx« verrät Dir auch die PID des
Parent, so daß Du überprüfen kannst, daß wirklich sntop der
Schuldige ist.

Gruß
   Olli

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
I worry about my child and the Internet all the time, even though she's
too young to have logged on yet.  Here's what I worry about.  I worry
that 10 or 15 years from now, she will come to me and say "Daddy, where
were you when they took freedom of the press away from the Internet?"
       -- Mike Godwin
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Wed 26 Mar 2003 - 18:34:21 CET

search this site