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.