Hi,

To enable your program to react to signal you need to use fpSigAction. 
See here for usage: 
http://www.freepascal.org/docs-html/rtl/baseunix/fpsigaction.html

Instead of SigUsr1 in the example you can register a procedure for SIGTerm to 
handle a termination request.
You can also add a procedure for SIGHUP if you want to implement a "service .. 
reload" action.
The complete list of signal is in rtl/linux/signal.inc

By using SIGTerm (the default kill signal) you can cleanly close your program 
and releasing all resources, this is much better than using "kill -9" that stop 
the program abruptly. 

Patrick



--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to