jenkinsci / lib-file-leak-detector

Java agent that detects file handle leak
http://file-leak-detector.kohsuke.org/
MIT License
241 stars 112 forks source link

Avoid using System.exit because it kills the JVM #39

Closed MRamonLeon closed 5 years ago

MRamonLeon commented 5 years ago

Avoid using the System.exit instruction because it kills the JVM in the server. Specifically it kills the Jenkins instance running in the same machine. For example, when this process is called with wrong arguments.

@reviewbybees @kohsuke

MRamonLeon commented 5 years ago

I think that at the point where the System.exit is called there is no other threads created and it's safe to do a return instead of a System.exit.

jglick commented 5 years ago

JENKINS-53394 I presume. Please maintain cross-links.