File: 0025-invalid-configuration-exit-status.patch

package info (click to toggle)
tomcat11 11.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 47,028 kB
  • sloc: java: 366,244; xml: 55,681; jsp: 4,783; sh: 1,304; perl: 324; makefile: 25; ansic: 14
file content (16 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: Fix the exit status when Tomcat terminates because the configuration is invalid
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=62607
--- a/java/org/apache/catalina/startup/Bootstrap.java
+++ b/java/org/apache/catalina/startup/Bootstrap.java
@@ -470,6 +470,10 @@
                 case "start":
                     daemon.setAwait(true);
                     daemon.load(args);
+                if (null == daemon.getServer()) {
+                    log.fatal("Cannot start server. Server instance is not configured.");
+                    System.exit(1);
+                }
                     daemon.start();
                     if (null == daemon.getServer()) {
                         System.exit(1);