You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/02/13 16:32:56 UTC

svn commit: r1782805 - in /tomcat/trunk: bin/catalina.sh webapps/docs/changelog.xml

Author: markt
Date: Mon Feb 13 16:32:56 2017
New Revision: 1782805

URL: http://svn.apache.org/viewvc?rev=1782805&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=60632
Add support for the CATALINA_EXIT_DELAY environment variable that can be used to work around a known systemd bug.
Based on a patch by Jeff Turner.

Modified:
    tomcat/trunk/bin/catalina.sh
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/bin/catalina.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=1782805&r1=1782804&r2=1782805&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.sh (original)
+++ tomcat/trunk/bin/catalina.sh Mon Feb 13 16:32:56 2017
@@ -98,6 +98,13 @@
 #                   use nohup so that the Tomcat process will ignore any hangup
 #                   signals. Default is "false" unless running on HP-UX in which
 #                   case the default is "true"
+#
+#   CATALINA_EXIT_DELAY
+#                   (Optional) If started with systemd, add
+#                   'Environment=CATALINA_EXIT_DELAY=0.1' to your service file
+#                   to prevent systemd losing the last few log messages. 
+#                   See https://github.com/systemd/systemd/issues/1347
+#
 # -----------------------------------------------------------------------------
 
 # OS specific support.  $var _must_ be set to either true or false.
@@ -280,6 +287,10 @@ if [ "$USE_NOHUP" = "true" ]; then
     _NOHUP=nohup
 fi
 
+if [ -n "${CATALINA_EXIT_DELAY:-}" ]; then
+    trap 'sleep ${CATALINA_EXIT_DELAY}' INT EXIT TERM
+fi
+
 # ----- Execute The Requested Command -----------------------------------------
 
 # Bugzilla 37848: only output this if we have a TTY

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1782805&r1=1782804&r2=1782805&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Feb 13 16:32:56 2017
@@ -187,6 +187,11 @@
       <fix>
         Spelling corrections provided by Josh Soref. (violetagg)
       </fix>
+      <add>
+        <bug>60632</bug>: Add support for the <code>CATALINA_EXIT_DELAY</code>
+        environment variable that can be used to work around a known systemd
+        bug. Based on a patch by Jeff Turner. (markt)
+      </add>
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org