Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Handle SIGTERM on Linux



On Sat, Feb 24, 2018 at 8:31 AM, Thomas Singer <ts-swt@xxxxxxxxxxx> wrote:
Hello,

For Linux some users complain from time to time that SmartGit does not store its settings when Linux is shut down while SmartGit is running. SmartGit stores its settings when it is cleanly exited - either by closing all windows (main shells), by invoking the exit menu item or by the display's Close-listener.

Could it be that the display's Close-listener is not invoked if Linux sends a SIGTERM signal to tell the application to exit? How much time a Linux application usually has to react on the SIGTERM signal? Thanks in advance.

This is a good example on how to handle SIGTERM - https://airtower.wordpress.com/2010/06/16/catch-sigterm-exit-gracefully/ . In general there is no limitation for the time the handler should take but note that it will eventually receive SIGKILL if it takes too long. It's worth trying whether your CloseListener is called when killing the process with console kill. I have never looked into whether SWT does smth like that.
 

--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Alexander Kurtakov
Red Hat Eclipse Team

Back to the top