:: Re: [DNG] BUG: zombies increase whi…
Top Page
Delete this message
Reply to this message
Author: Rainer Weikusat
Date:  
To: dng
Subject: Re: [DNG] BUG: zombies increase while running netman
Edward Bartolo <edbarx@???> writes:
> I explicitly avoided to use WaitOnExit() to avoid having to use
> multi-threading which I wanted to avoid. I will try to create a
> descendant of TThread to use it to Connect and Disconnect but I need
> to be cautious to avoid complicating the code.


All you need to do is set the disposition of SIGCHLD to SIG_IGN in the
frontend.

http://www.freepascal.org/docs-html/rtl/baseunix/fpsigaction.html

This will work for the backend process itself, including anything
invoked from that via execl (or another exec-wrapper). In case the
backend creates processes, these will end up orphaned after the backend
process exited, hence, they will be re-parented to init which ought to
collect the exit status and discard it, so, no zombies will be lingering
around.