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 2013/08/20 21:11:25 UTC
svn commit: r1515929 - in /tomcat/tc7.0.x/trunk: ./ bin/catalina.sh
webapps/docs/changelog.xml
Author: markt
Date: Tue Aug 20 19:11:24 2013
New Revision: 1515929
URL: http://svn.apache.org/r1515929
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55439
Don't try a forced stop (kill -9 $PID) if Tomcat has already been stopped and the PID file cleared else a bunch of errors will result.
Additionally, improve handling in a forced stop of situation when the PID file can be written to but not deleted.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/bin/catalina.sh
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1515926
Modified: tomcat/tc7.0.x/trunk/bin/catalina.sh
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/bin/catalina.sh?rev=1515929&r1=1515928&r2=1515929&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/bin/catalina.sh (original)
+++ tomcat/tc7.0.x/trunk/bin/catalina.sh Tue Aug 20 19:11:24 2013
@@ -450,6 +450,8 @@ elif [ "$1" = "stop" ] ; then
if [ $? != 0 ]; then
if [ -w "$CATALINA_PID" ]; then
cat /dev/null > "$CATALINA_PID"
+ # If Tomcat has stopped don't try and force a stop with an empty PID file
+ FORCE=0
else
echo "Tomcat stopped but the PID file could not be removed or cleared."
fi
@@ -484,7 +486,13 @@ elif [ "$1" = "stop" ] ; then
if [ $? -gt 0 ]; then
rm -f "$CATALINA_PID" >/dev/null 2>&1
if [ $? != 0 ]; then
- echo "Tomcat was killed but the PID file could not be removed."
+ if [ -w "$CATALINA_PID" ]; then
+ cat /dev/null > "$CATALINA_PID"
+ else
+ echo "Tomcat was killed but the PID file could not be removed."
+ fi
+ # Set this to zero else a warning will be issued about the process still running
+ KILL_SLEEP_INTERVAL=0
fi
break
fi
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1515929&r1=1515928&r2=1515929&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Aug 20 19:11:24 2013
@@ -121,6 +121,13 @@
without defining them as warnings. (markt)
</fix>
<fix>
+ <bug>55439</bug>: Don't try a forced stop when <code>stop
+ -force</code> is used if Tomcat has already been stopped. This avoids
+ error messages when the PID file has been cleared. If a forced stop is
+ required, improve handling of the case when the PID file can be read
+ from or written to but not deleted. (markt)
+ </fix>
+ <fix>
<bug>55454</bug>: Avoid NPE when parsing an incorrect content type.
(violetagg)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org