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

Sven Barth pascaldragon at googlemail.com
Sat Feb 16 19:03:16 CET 2013


On 16.02.2013 18:27, waldo kitty wrote:
> On 2/16/2013 05:26, Sven Barth wrote:
>> The reason for this "first TERM then KILL" approach is that an
>> application could
>> either hang (and thus not respond correctly to TERM if it has hooked
>> it) or it
>> could just ignore the TERM. So on shutdown the init system normally
>> sends a TERM
>> to all processes first and gives them a chance to cleanup any data
>> they might
>> want to save and then those applications that are left are killed.
>
> what can be done if it takes more than 5 seconds to perform the cleanup
> and closeout process when sigterm is received??

Nothing. And that's good, because I definitely dislike it when the 
computer hangs in shutting down (especially if that computer is a laptop 
with a spinning harddrive and I plan to move it rapidly after shutdown).

Regards,
Sven





More information about the Lazarus mailing list