:: Re: [DNG] BUG: zombies increase whi…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Rainer Weikusat
日付:  
To: dng
題目: 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.