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

Terminator.setup should ignore IAE when registering signal handlers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 8
    • 7, 8
    • core-libs
    • b55
    • generic, x86
    • generic, windows_7
    • Verified

        FULL PRODUCT VERSION :


        A DESCRIPTION OF THE PROBLEM :
        In java.lang.Terminator, separate signal registrations wrapped in a single try block to dedicated try block.

        Current code below:
                try {
                    Signal.handle(new Signal("INT"), sh);
                    Signal.handle(new Signal("TERM"), sh);
                } catch (IllegalArgumentException e) {
                }
        The revised code below:
                try {
                    Signal.handle(new Signal("INT"), sh);
                } catch (IllegalArgumentException e) {
                }
                try {
                    Signal.handle(new Signal("TERM"), sh);
                } catch (IllegalArgumentException e) {
                }
        The improved version makes more sense since exception thrown from first Signal.handle call does not affect subsequent calls. This is more consistent with its original intention.

        See more detailed discussion in community @
        http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-August/011189.html



        REPRODUCIBILITY :
        This bug can be reproduced always.

              alanb Alan Bateman
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: