From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,73c56f328cda1230,start X-Google-Attributes: gidfee84,public From: Jeff Denham Subject: Re: Cannot kill processes Date: 1999/02/17 Message-ID: <36CAE18D.A8AE9476@brighttiger.com>#1/1 X-Deja-AN: 445347290 Content-Transfer-Encoding: 7bit References: <7acpii$2df$1@charm.magnus.acs.ohio-state.edu> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@digex.net X-Trace: dca1-nnrp1.news.digex.net 919265719 207.86.119.34 (Wed, 17 Feb 1999 10:35:19 EDT) Organization: Bright Tiger Technologies MIME-Version: 1.0 NNTP-Posting-Date: Wed, 17 Feb 1999 10:35:19 EDT Newsgroups: comp.unix.osf.osf1 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 > 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