tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1002362 - /tomcat/trunk/bin/catalina.sh
Date Tue, 28 Sep 2010 21:30:27 GMT
Author: markt
Date: Tue Sep 28 21:30:27 2010
New Revision: 1002362

URL: http://svn.apache.org/viewvc?rev=1002362&view=rev
Log:
More review comments form mturk. Tighten up handling of ps output.

Modified:
    tomcat/trunk/bin/catalina.sh

Modified: tomcat/trunk/bin/catalina.sh
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=1002362&r1=1002361&r2=1002362&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.sh (original)
+++ tomcat/trunk/bin/catalina.sh Tue Sep 28 21:30:27 2010
@@ -323,7 +323,8 @@ elif [ "$1" = "start" ] ; then
       if [ -s "$CATALINA_PID" ]; then
         if [ -r "$CATALINA_PID" ]; then
           PID="`cat "$CATALINA_PID"`"
-          if ps -p $PID > /dev/null; then
+          ps -p $PID > /dev/null 2>&1
+          if [ $? -eq 0 ] ; then
             echo "Tomcat appears to still be running with PID $PID. Start aborted."
             exit 1
           else



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


Mime
View raw message