More review comments form mturk. Tighten up handling of ps output.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 28 Sep 2010 21:30:27 +0000 (21:30 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 28 Sep 2010 21:30:27 +0000 (21:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1002362 13f79535-47bb-0310-9956-ffa450edef68

bin/catalina.sh

index ca8b292..84daac1 100755 (executable)
@@ -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