On Thu, 18 Dec 2008 12:11:18 -0500 Liyuán García Caballero <[email protected]> wrote:
> Hi people, I have an application daemon when is sending the signal > TERM in Unix platform does not end, I attach the code. > >[...] > procedure Twands.DataModuleStop(Sender: TCustomDaemon; var OK: > Boolean); begin > If Assigned(FThread) then > begin > FThread.Terminate; > // Let the thread die silently. > If (FThread<>Nil) then > FThread.OnTerminate:=Nil; > end; > OK:=FThread=Nil; > end; FThread.Terminate does not wait until the thread has died. Check that your thread checks for Terminated=true and ends itself. Mattias _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
