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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to