Name: mg36071 Date: 03/22/99
The following program works fine with classic VM but must be
killed if runned with hotspot VM.
import sun.misc.*;
public abstract class Test {
public static final void main(String[] args) {
[...]
final Thread thread = Thread.currentThread();
Signal.handle(new Signal("INT"), new SignalHandler() {
public void handle(Signal sig) {
thread.interrupt();
}
});
Object sync = new Object();
synchronized (sync) {
try { sync.wait(); }
catch (InterruptedException exc) {
// program cleanup comes here...
System.exit(0);
}
}
}
}
(Review ID: 55843)
======================================================================
- relates to
-
JDK-4263367 sun.misc.Signal.handle does not work for Signal.raise
-
- Closed
-
-
JDK-4274356 sun.misc.Signal.handle does not work for Signal.raise on 2 CPU
-
- Closed
-