From: Jeff Denham <jdenham@brighttiger.com>
Subject: Re: Cannot kill <defunct> processes
Date: 1999/02/19 [thread overview]
Message-ID: <36CDDF6D.CA3E7837@brighttiger.com> (raw)
In-Reply-To: 36CC80E8.BE8049D5@netvision.net.il
Ori Tzoran wrote:
> then Jeff:
>
> > ....
> >
> > Outside the realm of vampires, you can't kill something that's
> > already dead, even a zombie process. That defunct process
> > still has a PID and a parent, but that's about it.
>
> well, defunct is EXACTLY a zombie. one is legacy unix term, the other is slang...
>
I never said they were different. Sorry you didn't
understand. I guess I just
should have said, "No, you can kill a defunct process; it's
already dead."
>
> >
> > If the parent PID of these defunct processes is 1 (the init process),
> > then you've hit an OS bug -- init should be cleaning these up.
>
> you wont encounter that....
>
No, probably not. But it does/has happened. I've fixed such
bugs in the
Digital UNIX kernel myself. Guess I'm still on the look out
for more.
> >
> >
> > But if the parent isn't PID 1, then the only way to clean them up is
> > to kill the buggy parent, which isn't cleaning up its zombie children.
>
> what an interesting idea. mind you, on DUX 4.0x, yppasswdd also leaves a zombie. so kill it too...
>
Again, you've misunderstood. I *never* said he *should*
kill the parent.
Just stating a plain and simple fact, thank you.
> >
> >
> > Most likely, this app was ported from a System V base, where it
> > used signal() to set SIGCHLD to SIG_IGN, which causes the system to
> > clean up zombies automatically.
> >
> > Under Tru64 UNIX, formerly known as Digital UNIX, formerly know
> > as DEC OSF/1, formerly known as OSF/1, formerly known as
> > Mach 2.5, you have to use sigaction() with SA_FLAGS set to
> > SA_NOCLDWAIT for SIGCHLD to get the same automatic cleanup
> > behavior (or run in the UNIX 95 evironment using,
> > of course, the c89 compiler, or link with libsys5). Maybe you
> > can pass that on to your vendor.
>
> this is quite interesting, but is a bit aside the issue.
>
No, it's not beside aside the issue. I've helped too many
developers/customers
with exactly this problem, which happens exactly for the
reason I stated.
The zombies are there because the parent didn't call wait()
to reap them.
Under SysV, you don't necessarily have to call wait -- you
just
do signal(SIGCHLD, SIG_IGN). Porting this code to a
BSD-based
system causes zombies to be created. Seen it over and over.
End of story.
It may not be why the zombies are there, but it's a decent
possibility.
Jeff
next prev parent reply other threads:[~1999-02-19 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7acpii$2df$1@charm.magnus.acs.ohio-state.edu>
1999-02-17 5:00 ` Cannot kill <defunct> processes Jeff Denham
1999-02-18 5:00 ` Ori Tzoran
1999-02-19 5:00 ` Jeff Denham [this message]
1999-02-17 5:00 ` Sergey Yu. Bobrovnikov
1999-02-18 5:00 ` Gene Homan
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox