Browse Source

SONARUNNER-139 Avoid running analysis in forked mode to hang forever

tags/2.5-rc1
Duarte Meneses 9 years ago
parent
commit
b1fabd71e1

+ 9
- 3
sonar-runner-impl/src/main/java/org/sonar/runner/impl/BatchLauncherMain.java View File

@@ -43,7 +43,7 @@ public class BatchLauncherMain {
try {
launcher.execute(props);
} finally {
//persistit has non-daemon threads that need to be stopped or the jvm w'ont quit
// try to still exit cleanly
launcher.stop();
}
}
@@ -59,7 +59,13 @@ public class BatchLauncherMain {
return props;
}

public static void main(String[] args) throws IOException {
new BatchLauncherMain(new IsolatedLauncherFactory()).execute(args);
public static void main(String[] args) {
try {
new BatchLauncherMain(new IsolatedLauncherFactory()).execute(args);
} catch (Exception e) {
e.printStackTrace(System.err);
// make sure non-daemon threads don't hang app
System.exit(1);
}
}
}

Loading…
Cancel
Save