[Lazarus] Finding out how a program's being terminated
Michael Van Canneyt
michael at freepascal.org
Sat Feb 16 18:43:51 CET 2013
On Sat, 16 Feb 2013, waldo kitty wrote:
> On 2/16/2013 08:30, Hans-Peter Diettrich wrote:
>> Procedures even may be different for Linux and Windows, depending on the
>> signal/message types. Even if a program can ignore SIGTERM, can it also
>> inform
>> the system that it doesn't *want* to close? On Windows a program can stop
>> an
>> shutdown, maybe not on other platforms.
>
> i have exactly this problem to deal with on *nix... my app needs to be
> allowed to complete its shutdown closeout procedures or there are problems on
> the next boot when it is started up... on shutdown, app managed data is
> removed from a living data file to another file for restoration on startup...
> this takes longer than 5 seconds and it hurts at times when the system
> sigkills the app :/
Why not just rename the file and do the cleanup on startup ?
Michael.
More information about the Lazarus
mailing list