[Lazarus] Exit Status of Lazarus App

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Thu Mar 21 17:05:07 CET 2013


Sven Barth wrote:
> Am 21.03.2013 14:23, schrieb David Copeland:
>> Hi,
>>
>> How can I set the exit status/return code of a Lazarus application? I
>> have done some searching but haven't found it.
> The variable you are looking for is called "ExitCode" (and as it is in 
> unit System it's always available). See here: 
> http://www.freepascal.org/docs-html/rtl/system/exitcode.html

Thanks for that as well. I've experimentally put it in a signal handler 
(that otherwise has the effect of setting a flag which is checked at an 
opportune point in the code) and can confirm it works. Also OK in an 
OnCloseQuery handler etc.

-- 
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