Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Jeff Denham <jdenham@brighttiger.com>
Subject: Re: Cannot kill <defunct> processes
Date: 1999/02/17	[thread overview]
Message-ID: <36CAE18D.A8AE9476@brighttiger.com> (raw)
In-Reply-To: 7acpii$2df$1@charm.magnus.acs.ohio-state.edu

Steen Hansen wrote:

> We have a purchased application running on our 4.0D version of Compaq's
> Unix (I refuse to call it the new stupid name).
>
> It leaves a stack of defunct processes sitting out there, which I would
> like to clean up, ahile we wait for the vendor to clean up his code. But I
> cannot kill them, I *believe* I can do that with other Unixes, though it's
> quite awhile ago I had any there.
>
> Why can't I kill this one?
>
> # ps -ef|grep 1018
> iii        1018  10710  0.0 -        ??           0:00.00 <defunct>
> root      19371   8041  0.2 16:48:27 ttyr1        0:00.02 grep 1018
> # kill 1018
> kill: 1018: no such process

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.

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.

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.

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.

__________________________________________________
Jeff Denham (jdenham@brighttiger.com)

Bright Tiger Technologies:  Resource-management software
for building and managing fast, reliable web sites
See us at http://www.brighttiger.com

125 Nagog Park
Acton, MA 01720
Phone: (978) 263-5455 x177
Fax:   (978) 263-5547





  parent reply	other threads:[~1999-02-17  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 Sergey Yu. Bobrovnikov
1999-02-18  5:00   ` Gene Homan
1999-02-17  5:00 ` Jeff Denham [this message]
1999-02-18  5:00   ` Ori Tzoran
1999-02-19  5:00     ` Jeff Denham
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