From owner-freebsd-questions Sun Nov 19 19:06:55 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA02028 for questions-outgoing; Sun, 19 Nov 1995 19:06:55 -0800 Received: from vellocet.insync.net (vellocet.insync.net [204.253.208.10]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id TAA02003 for ; Sun, 19 Nov 1995 19:06:41 -0800 Received: from line-26.insync.net (line-26.insync.net [204.253.208.226]) by vellocet.insync.net (8.7.1/8.7.1) with SMTP id VAA26624; Sun, 19 Nov 1995 21:00:41 -0600 (CST) Message-Id: <199511200300.VAA26624@vellocet.insync.net> X-Sender: rberndt@nething.com X-Mailer: Windows Eudora Version 2.1.1 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 19 Nov 1995 20:06:41 -0600 To: Terry Lambert From: Randy Berndt Subject: Re: Cap'n, there be Zombies here! Cc: freebsd-questions@FreeBSD.ORG Sender: owner-questions@FreeBSD.ORG Precedence: bulk Thanks for the quick reply. No, I'm not reaping (reaping?). I have LIMITED experience with the signal() facility. The man page for signal says the default action is 'ignore' for SIGCHLD. Should I set up something that says: (void) signal(SIGCHLD, throw_away) void throw_away() { } in the part that sets up the fork. Also, it is not clear to me if 'execlp' waits for completion before continuing. If it does not, maybe the SIGCHLD is coming from execlp to the process that quit before it did. Any way to (pardon the phrase) "forcably reap" a process? Is the only way to remove a zombie to reboot? At 03:32 PM 11/19/95 -0700, Terry Lambert wrote: >> Questions: >> >> How does a zombie get created anyway? > >Each process that exits expects its parent process to ignore SIGCHLD *or* >to reap it using wait, waitpid, wait3, or wait4. > >A child that has exited but has not been reaped by its parent is a zombie. > >> How can I examine a zombie to verify where it is coming from? > >Do a "ps -gaxl" and note its parent process ID. 8-). > >> Does anything in the code look wrong? > >Yeah. I don't see your fork so I can't tell if you are correctly ignoring >SIGCHLD or reaping the child in you paren't process' main loop. 8-). > > > Terry Lambert > terry@lambert.org >--- >Any opinions in this posting are my own and not those of my present >or previous employers. > > Randy Berndt ---------------------------------- AOS/VS, FreeBSD, DOS: I'm in a maze of twisty little command interpreters, all different.