title: Sending Signals to a Running JVM
body: <p>I'm using a custom signal handler to catch TERM, ABRT and INT signals in a custom java daemon.  I have this handler in the code so that I can send TERM signals to it and gracefully shutdown the program via the kill command. The signal handler works right now, but when I compile the code I'm receiving the following warning (many times over):</p>
  
  <p><strong><em>warning: sun.misc.SignalHandler is Sun proprietary API and may be removed in a future release</em></strong></p>
  
  <p>while using these classes:</p>
  
  <pre><code>import sun.misc.SignalHandler;
  import sun.misc.Signal;
  </code></pre>
  
  <p>Is there a better way to send signals to a running JVM to initiate a shutdown of the main thread?  I don't like having my code tied to this API when it could be removed in the future.</p>
  
  <p>This code works on Solaris and HPUX today using 1.5.0_22 JVM.  Any help or suggestions would be much appreciated.  I used this document, from IBM, to develop the signal handler:</p>
  
  <p><a href="http://www.ibm.com/developerworks/java/library/i-signalhandling/" rel="noreferrer">http://www.ibm.com/developerworks/java/library/i-signalhandling/</a></p>