Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4274356

sun.misc.Signal.handle does not work for Signal.raise on 2 CPU

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: dkC59003 Date: 09/22/99



      HotSpot 2.0beta-E fails to pass the test nsk/regression/b4222557 (see source below):
      return value is 97, signal raised with Signal.raise method is not handled by
      a user-defined handler.
      This occurred only on machines (2 of them) with 2 CPU. Two different machines
      each with single processor were OK.
      See also bugreport #4263367 filed against classic.
      Log and test source follow:

      $ java -version
      java version "1.2.2"
      Java(TM) HotSpot Server VM (2.0beta, mixed mode, build E)

      $ java b4222557
      $ echo $?
      97

      ----------------------------------------------------------- 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;
          }
      }

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rschmidtsunw Rene Schmidt (Inactive)
              Reporter:
              dkhukhrosunw Dmitry Khukhro (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: