Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is may very well be a JVM implementation specific problem. We are using an undocumented / unsupported API (<code>sun.misc.Signal/SignalHandler</code>) and therefore no contract on the behavior of the API is guaranteed.</p> <p>The IBM JVM implementation could do signal-handling-related-things differently from the SUN JVM implementation and thus cause this problem. So that this specific use case works in the SUN JVM but not in the IBM JVM.</p> <p>But try out the following (I can't try it out myself):</p> <p>Do all combinations off starting the JVM with one/two/three of those parameters and there possible value combinations.</p> <ol> <li>the <code>-Xrs</code> option specified / not specified</li> <li>the property <code>ibm.signalhandling.sigint</code> set to <code>true</code> / <code>false</code></li> <li>the property <code>ibm.signalhandling.rs</code> set to <code>true</code> / <code>false</code></li> </ol> <p>(The properties where found via google in several error dumps but I can't find any specific documentation on them)</p> <p>I don't know if the IBM JVM also supports this special flag but you could try adding this too which in SUN JVM seems to be specific for some problems with signal handlers under linux/solaris</p> <pre><code>-XX:-AllowUserSignalHandlers </code></pre> <p>Or try using a native signal handler if that is an option for you. Check out the code samples provided:</p> <ul> <li>in the <a href="http://www.ibm.com/developerworks/java/library/i-signalhandling" rel="nofollow noreferrer">link below</a></li> <li><a href="http://groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/bac336a1411a3b4e/b3268276845a3ca4" rel="nofollow noreferrer">Catching SIGINT in a Java application under UNIX</a></li> <li><a href="http://javajiggle.com/2008/01/06/if-jni-based-application-is-crashing-check-signal-handling/" rel="nofollow noreferrer">Check signal handling, native signal chainging</a></li> <li><a href="http://java.sun.com/javase/6/webnotes/trouble/TSG-VM/html/signals.html#gbzcz" rel="nofollow noreferrer">JDK 6 HotSpot VM - Signal Handling on Solaris OS and Linux</a></li> </ul> <p>Although it doesn't relate to your specific problem, an IBM article on JVM signal handling (slightly dated but still mostly correct). With samples for native code signal handlers:</p> <p><a href="http://www.ibm.com/developerworks/java/library/i-signalhandling" rel="nofollow noreferrer">Revelations on Java signal handling and termination</a></p> <hr> <p>But I guess this may all be to no avail as the IBM JVM implementation could rely on handling <code>SIGINT</code> itself to function correctly and thus never giving you a chance to handle <code>SIGINT</code> yourself.</p> <p>Btw. from the <a href="http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html" rel="nofollow noreferrer">description to the <code>-Xrs</code> flag</a> I understand that it actually may hinder you to do what you want. It says</p> <blockquote> <p>When <code>-Xrs</code> is used on Sun's JVM, the signal masks for SIGINT, SIGTERM, SIGHUP, and SIGQUIT are not changed by the JVM, and <strong>signal handlers for these</strong> <strong>signals are not installed</strong>.</p> </blockquote> <p>Or it could mean that only the JVM default actions for the signals aren't executed. Or it could depend on the JVM implementation what is really meant.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload