Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-12

My daemon no stop under Linux...

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Liyuán García Caballero
Show quoted text 15 lines
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 (FThreadNil) 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

Reply by email