Date: Wed, 16 Sep 1998 13:38:52 +1200 From: Jonathan Chen <jonc@pinnacle.co.nz> To: Purrcat <K.Staring@UCI.KUN.NL> Cc: questions@FreeBSD.ORG Subject: Re: sockets, forking and zombies Message-ID: <Pine.SGI.4.02.9809161335150.3268-100000@tui.pinnacle.co.nz> In-Reply-To: <35FEF4D7.D9D54D84@uci.kun.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Sep 1998, Purrcat wrote:
> I have included a
> signalhandler: "(void) signal(SIGCHLD, SIG_IGN);" which should say that
> the parent should ignore everything the child wants to say to the
> parent.
Haven't seen this working 'cept on some SysV machines.
>Still, the zombie process emerges... Does anyone know what I am
> doing wrong?
The parent process needs to reap the return status to remove the
zombies. Have something like:
while (waitpid (-1, &status, WNOHANG) > 0);
for the parent process in your code.
Jonathan Chen
----------------------------------------------------------------------
"Nyuck, nyuck, nyuck!" - Curly
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SGI.4.02.9809161335150.3268-100000>
