[Lazarus] Finding out how a program's being terminated

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Sat Feb 16 09:22:27 CET 2013


On unix (Linux, Solaris etc.) is it possible to determine how a program 
written using Lazarus is being terminated? Specifically, is there any 
different behaviour when a  kill  signal arrives from a routine  term 
signal, and is a title-bar close button simply a  term  signal?

I'm trying to think ahead and plan for what a bunch of related (but not 
necessarily tightly-coupled) programs do if there's e.g. a UPS shutdown 
notification which sends a  kill  signal. Specifically, if there's a 
routine  term  it is probably appropriate to save the current window 
sizes etc. while if there's a  kill  because the UPS is trying to shut 
everything down fast it's probably safest to assume that there's a risk 
of multiple programs trying to access common files simultaneously.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list