SteNicholas commented on a change in pull request #15185: URL: https://github.com/apache/flink/pull/15185#discussion_r593852102
########## File path: flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java ########## @@ -1124,20 +1124,21 @@ public static void main(final String[] args) { final List<CustomCommandLine> customCommandLines = loadCustomCommandLines(configuration, configurationDirectory); + int retCode = -1; try { final CliFrontend cli = new CliFrontend(configuration, customCommandLines); SecurityUtils.install(new SecurityConfiguration(cli.configuration)); - int retCode = + retCode = SecurityUtils.getInstalledContext().runSecured(() -> cli.parseAndRun(args)); - System.exit(retCode); } catch (Throwable t) { final Throwable strippedThrowable = ExceptionUtils.stripException(t, UndeclaredThrowableException.class); LOG.error("Fatal error while running command line interface.", strippedThrowable); strippedThrowable.printStackTrace(); System.exit(31); Review comment: retCode = 31, and call `System#exit` method in finally block. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org