8075604: jjs exits even when non-daemon threads are still active

Reviewed-by: attila, jlaskey
This commit is contained in:
Athijegannathan Sundararajan 2015-03-20 20:04:18 +05:30
parent b7d77b1297
commit 2d6a39e2e5

View File

@ -109,7 +109,10 @@ public class Shell {
*/
public static void main(final String[] args) {
try {
System.exit(main(System.in, System.out, System.err, args));
final int exitCode = main(System.in, System.out, System.err, args);
if (exitCode != SUCCESS) {
System.exit(exitCode);
}
} catch (final IOException e) {
System.err.println(e); //bootstrapping, Context.err may not exist
System.exit(IO_ERROR);