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