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

Hi all,

On Sat, Feb 24, 2018 at 3:18 PM, Aleksandar Kurtakov <akurtako@xxxxxxxxxx> wrote:

On Sat, Feb 24, 2018 at 12:11 PM, Thomas Singer <ts-swt@xxxxxxxxxxx> wrote:

Now the question is how to do that in a Java application?

That's a good question for which I don't know the answer. IMHO such work would have to live in SWT (or some other part having C/JNI parts) where such implementation can be done and CloseListeners to be called on SIGTERM. This requires someone doing all the experiments and providing a patch.

GTK has g_unix_signal_add() that dispatches a callback to the GUI thread.
SWT could use it to send Close and dispose the display.
 
BTW, is SWT handling termination properly on Win and Mac?

Windows port is fine. Graceful termination implies that top level shells will receive close events. System shutdown event is handled properly too.


Regards,
Nikita Nemkin

Back to the top