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

sun.misc.Signal does not works with HotSpot

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.0
    • 1.0
    • hotspot
    • rc2
    • x86
    • windows_nt
    • Not verified



      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)
      ======================================================================

            rschmidtsunw Rene Schmidt (Inactive)
            mgharahgsunw Mohammad Gharahgouzloo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: