How to handle a SIGTERM

前端 未结 3 650
一生所求
一生所求 2020-11-29 00:06

Is there a way in Java to handle a received SIGTERM?

3条回答
  •  旧时难觅i
    2020-11-29 00:40

    Another way to handle signals in Java is via the sun.misc.signal package. Refer to http://www.ibm.com/developerworks/java/library/i-signalhandling/ for understanding how to use it.

    NOTE: The functionality being within sun.* package would also mean that it may not be portable/behave-the-same across all OS(s). But you may want to try it out.

提交回复
热议问题