-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.3.0
-
generic
-
generic
Name: dkC59003 Date: 08/18/99
Classic VMs (from 1.2 to Kestrel fcs) fail to pass the test below (return value is 97)
both on win32 and Solaris: signal raised with Signal.raise method is not handled by
a user-defined handler.
For instance:
$ java -classic -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-A)
Classic VM (build 1.3.0-A, native threads, nojit)
$ java b4222557
$ echo $?
97
The test is passed by HotSpot VMs 1.3beta-C to 1.3beta-J, 1.0.1fcs-G on winNT
and by HotSpot 1.3beta-N on Solaris.
The test is failed by HotSpot VMs 1.3beta-K to 1.3beta-N on winNT and by
HotSpot 1.3beta-M on Solaris.
The test was developed as a regression test for the bug filed against
HotSpot 1.0_early_access:
#4222557 Synopsis: sun.misc.Signal does not work with HotSpot
(Integrated in releases: 1.0_rc2).
----------------------------------------------------------- b4222557.java
import java.io.PrintStream;
import sun.misc.*;
public class b4222557 {
private static int res = 2/*STATUS_FAILED*/;
public static void main(String argv[]) {
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public static int run(String args[], PrintStream out) {
Signal.handle(new Signal("INT"), new SignalHandler() {
public void handle(Signal sig) {
res = 0/*STATUS_PASSED*/;
}
});
Signal.raise(new Signal("INT"));
return res;
}
}
======================================================================
- relates to
-
JDK-4222557 sun.misc.Signal does not works with HotSpot
-
- Closed
-
-
JDK-4274356 sun.misc.Signal.handle does not work for Signal.raise on 2 CPU
-
- Closed
-