Date: Sun, 19 Nov 1995 20:06:41 -0600 From: Randy Berndt <rberndt@nething.com> To: Terry Lambert <terry@lambert.org> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Cap'n, there be Zombies here! Message-ID: <199511200300.VAA26624@vellocet.insync.net>
next in thread | raw e-mail | index | archive | help
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 <rberndt@nething.com> ---------------------------------- AOS/VS, FreeBSD, DOS: I'm in a maze of twisty little command interpreters, all different.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511200300.VAA26624>